What is the OSI Model? Easily Understand the Networking Foundation

The OSI (Open Systems Interconnection) Model serves as a framework to standardize how data flows and communicates between different systems over a network. This model is divided into seven distinct layers, each with a specialized role in managing communication. To offer a more relatable understanding, we’ll compare the OSI Model to the process of mailing a letter, illustrating each layer’s function in this analogy.

  • Layer 1 – Physical Layer : Transmits raw data via hardware.
  • Layer 2 – Data Link Layer: Handles data framing and error checking.
  • Layer 3 – Network Layer: Routes data across networks using IP addresses.
  • Layer 4 – Transport Layer: Ensures reliable data transfer and flow control.
  • Layer 5 – Session Layer: Manages and maintains communication sessions.
  • Layer 6 – Presentation Layer: Translates, encrypts, and compresses data.
  • Layer 7 – Application Layer: Provides network services directly to applications and users.

We also included mnemonics towards the end of the article for you to help easily remember.

Introduction

The OSI Model is a foundational concept in the field of networking, segmenting the data communication process into seven layers. Each layer handles a specific aspect of the communication, providing a clear structure that facilitates understanding, implementation, and troubleshooting. To simplify these complex concepts, we’ll draw parallels with a familiar scenario: sending a letter. Let’s explore each layer in detail and relate them to the steps involved in delivering a letter.

The Seven Layers of the OSI Model

1. Physical Layer (Layer 1)

  • Role: The Physical Layer is responsible for the physical transmission of data, handling the raw bits and the hardware aspects. This includes cables, switches, and other physical media. It defines the mechanical, electrical, and procedural characteristics needed for transmitting data.
  • Technical Aspects: This layer involves bit rate control, signal encoding, and modulation. In fiber optic communication, for example, it deals with converting electrical signals to light and vice versa. Standards like IEEE 802.3 for Ethernet and ITU-T G.709 for Optical Transport Network are relevant here.
  • Analogy: Consider this layer as the various transportation modes used by a postal service—trucks, airplanes, and ships. Just as these vehicles move letters physically, the Physical Layer transmits raw data through cables and wireless signals.

2. Data Link Layer (Layer 2)

  • Role: The Data Link Layer provides a reliable link between two directly connected nodes. It ensures data is transferred error-free and manages access to the physical medium. This layer also frames data, adding essential information for proper delivery.
  • Technical Aspects: This layer is split into two sublayers: MAC (Media Access Control) and LLC (Logical Link Control). The MAC sublayer controls how devices on a network gain access to the medium, while the LLC sublayer manages frame synchronization and error checking. Protocols like Ethernet, Wi-Fi, and PPP operate at this layer.
  • Analogy: Think of this as the envelope and addressing system for letters. Just as an envelope must have the correct address to reach its destination, the Data Link Layer uses MAC addresses to direct data to the appropriate hardware device.

3. Network Layer (Layer 3)

  • Role: The Network Layer determines the best path for data to travel across networks. It handles routing, forwarding, and addressing, using logical addresses to identify devices on different networks.
  • Technical Aspects: The Network Layer uses IP addresses to identify devices and route data packets. Key protocols include IP (Internet Protocol), ICMP (Internet Control Message Protocol), and ARP (Address Resolution Protocol). This layer also deals with packet fragmentation and reassembly.
  • Analogy: This layer functions like the postal sorting centers that route letters. Just as these centers use postal codes to determine the best route, the Network Layer uses IP addresses to navigate data packets across different networks.

4. Transport Layer (Layer 4)

  • Role: The Transport Layer ensures the reliable transfer of data across a network, managing error recovery, flow control, and data segmentation. It offers both connection-oriented (TCP) and connectionless (UDP) communication services.
  • Technical Aspects: TCP (Transmission Control Protocol) provides reliable communication with error correction, flow control, and sequencing. UDP (User Datagram Protocol) is used for faster, less reliable communication. Port numbers are utilized to distinguish between different services on the same device.
  • Analogy: This is like tracking and ensuring the safe delivery of a registered letter. The Transport Layer makes sure data reaches its destination accurately and in the correct order, akin to confirming the receipt and integrity of a letter.

5. Session Layer (Layer 5)

  • Role: The Session Layer manages sessions between applications, establishing, maintaining, and terminating connections. It keeps track of the dialogue between systems, ensuring that data is correctly exchanged and synchronized.
  • Technical Aspects: This layer uses protocols like PPTP (Point-to-Point Tunneling Protocol), NetBIOS, and RPC (Remote Procedure Call). It provides services like dialog control, offering full-duplex, half-duplex, or simplex communication.
  • Analogy: The Session Layer is like the agreed-upon rules for correspondence between two parties. It manages the start and end of a conversation, ensuring that both parties can communicate effectively and understand each other.

6. Presentation Layer (Layer 6)

  • Role: The Presentation Layer translates data between the network and the application. It handles data formatting, encryption, and compression, ensuring that data is in a usable format for the receiving system.
  • Technical Aspects: This layer is responsible for data encryption (SSL/TLS), compression (JPEG, MPEG), and translation. It converts data to a format that the Application Layer can use, such as converting character encoding or data structures.
  • Analogy: Consider this the translation service that converts a letter into a language the recipient can understand. The Presentation Layer ensures that data is presented in a format that is compatible with the receiving application.

7. Application Layer (Layer 7)

  • Role: The Application Layer provides network services directly to the end-user and application processes. It interfaces with software applications, offering functionalities such as email, file transfer, and web browsing.
  • Technical Aspects: This layer includes protocols like HTTP, FTP, SMTP, DNS, and POP3. It provides services like resource sharing, directory services, and remote access, facilitating communication between users and applications.
  • Analogy: The Application Layer is the content of the letter itself, whether it’s a personal message, an invoice, or an invitation. This layer delivers the actual data that the user interacts with, providing a seamless interface for network communication.

How the Layers Interact

The OSI Model’s seven layers work together to facilitate data communication. Data originates from the Application Layer, traveling down through the layers, with each layer adding its own header or trailer. Once the data reaches the Physical Layer, it is transmitted over the network. Upon reaching the destination, the data travels back up the layers, with each layer interpreting and processing its specific portion, until the data reaches the Application Layer and is presented to the user.

Mnemonic for Easy Recall

To easily remember the seven layers of the OSI Model, you can use the acronym “Please Do Not Throw Sausage Pizza Away” or its reverse version, “All People Seem To Need Data Processing“. These mnemonics help you recall the order of the layers, with each initial representing a specific layer:

  • P: Physical Layer (Layer 1)
  • D: Data Link Layer (Layer 2)
  • N: Network Layer (Layer 3)
  • T: Transport Layer (Layer 4)
  • S: Session Layer (Layer 5)
  • P: Presentation Layer (Layer 6)
  • A: Application Layer (Layer 7)

This simple phrase can be a handy tool for quickly recalling the layers in order, making it easier to remember their functions and relationships.

Conclusion

The OSI Model is a vital framework in understanding network communication, breaking down the process into manageable layers. Each layer serves a distinct purpose, ensuring that data is transmitted efficiently and securely across networks. By using the analogy of sending a letter, we can better grasp these complex concepts, making it easier to understand how data travels from one device to another. Understanding the technical details of each layer is crucial for anyone involved in network design, implementation, and troubleshooting, providing a clear roadmap for ensuring seamless communication.

Encoding vs Encription vs Hashing: Explained in One Word

This could be often confusing so to remember I tried to use one word and a short explanation without getting into any technical details here.

 

1. Encoding = Translate

It’s goal is to converts data so it can be understood by another system. Security is not it’s concern.
ex. ASCII, Unicode

 

2. Encryption = Transform

It’s goal is to change the data into a different format so it’s Super Secure and will require a key to unlock. Security is it’s main concern.
ex. DES, 3DES, AES

 

3. Hashing = un-Touched

It’s goal is to check the data and make sure there was no modification of any kind during the transfer and the data is intact. Integrity is it’s main concern.
ex. MD5, SHA

 

Just remember the Triple T, Translate, Transform, un-Touched.

I tried to find a word that I can replace un-Touched which starts with T but wasn’t able to find. If anyone can come up with something better please leave a comment and I will replace it.

How to copy a VM host to host without vCenter

I would like to show you how you can copy (using SCP) a virtual machine from one ESXi host to another ESXi host without using a vCenter.

 

Login to both ESXi hosts that you are copying from and copying to and make sure SSH is enabled by following the setups below.

Check under Configuration Tab of the host > Security Profile > Services > Click Properties and check SSH is running if not start

ssh enabled

If SSH is Stopped, click Options

Select “Start and stop manually” and hit Start.

Under Firewall check SSH Server Client is checked.

Firewall Property

Make sure this is done on both the host.

Now you can ssh into the esxi host 1 that has the VM that needs to be transferred. Lets give that host ip 1.1.1.1 and the Host 2 that’s going to receive the file will be 2.2.2.2.

You can SSH into the host 1 using putty(win) or terminal (mac)

#ssh root@1.1.1.1
The authenticity of host '1.1.1.1 (1.1.1.1)' can't be established.
 RSA key fingerprint is b2:d6:00:34:aa:cc:62:95:8f:d7:f3:1d:59:1e:c3:54.
 Are you sure you want to continue connecting (yes/no)? yes                         <------ Say yes

then it will prompt for Password: so enter that.

Do a ping test from host 1 to host 2

 ~ # ping 2.2.2.2

If it’s pinging that it looks good. I am not sure but In some cases the ping might be blocked.

Start transfering folder

 nohup scp -rv /vmfs/volumes/data-store1/vm-folder-name root@2.2.2.2:/vmfs/volumes/data-store2/

 

For Multiple VMs (Folders)

First change directory to the Datastore folder

cd /vmfs/volumes/data-store1/

Then it’s better to enter multiple VMs leave just a single space between the VM folder name. No quotes or commas.

nohup scp -rv vm-folder-1 vm-folder-2 root@2.2.2.2:/vmfs/volumes/data-store2/

Now you will be prompted for “host 2” password. enter that and the file transfer will start. The flags used here are -rv, where r is for folder tranfer and v for verbos to watch the progress.

Note: I added nohup before scp, this will allow the command to run in background even if you close Terminal/Putty window.

How to Password Reset on 3850 Switch

Do the regular routine of unplugging the power-cord and holding the mode button and then plugging back until you land in recover mode (switch:)

Now enter the following commands

switch: SWITCH_IGNORE_STARTUP_CFG=1
switch: SWITCH_DISABLE_PASSWORD_RECOVERY=0
switch: boot

After reboot

Switch(config)#no system ignore startupconfig switch all
Switch(config)#system disable password recovery switch all
Switch#copy running startup

 

Authentication vs Authorization

I use to always find these two words confusing. Never use to understand the difference between both and actually both sounded like same with similar meaning. Actually they are not.

Authentication (AuthC) is the process of identifying the authenticity of a user. Is he really the same person he claims to be or he is hiding behind a mask of someone else.

Example: If you have ever been to a convention center (Ex. RSA, Cisco Live etc.) you will first go to the front desk were they will ask you for your name and company ID and also will request you to accompany with a Driver’s License. Now they are trying to Authenticate whether the company badge and the Driver’s License belongs to the same person.

AuthoriZation (AuthZ) is the process of assigning permission or restrictions, in other words what level of access to secure assets or location.

Example: Once your ID is checked at the front desk of the convention center and you are authenticated, a badge (tag) is given to you which might say Guest, Exhibitor or Owner etc. Based on what Authorization or access level you are granted, you can access certain levels and rooms in the convention center.

I hope this clarifies.

Setting up TFTP server on Windows Machine

Go to tftpd32 website.

Click Download from the top menu. Then Select tftpd32 standard edition (installer) and download the exe file.

Start the installer and if prompted with the following screen hit yes.

 

Select I Agree

 

 

Leave the default settings and hit Next.

 

 

 

Leave the default location unless you really have to change it and then hit Install.

 

Installation should be now complete, simply click close.

 

 

 

From your desktop double-click the Tftpd32 icon.

Once the application starts, select Settings > GLOBAL (Tab) and just check TFTP Server/Client unless you want the others.

Now select TFTP (Tab) > Browse (Base Directory)

I recommend you to create a tftp folder under (C:) drive and select it as below and hit ok:

If it prompts to restart the server please do so. Your ftp server is ready to use.