Google
Your Ad Here

Tuesday, June 24, 2008

What is the OSI model?

The OSI model is a hierarchical model of how different devices, protocols, and applications can interoperate to provide a network. The OSI (open systems interconnect) model was created by the International Standards Organization (ISO).

The applications and protocols that make up the network reside at different layers of the OSI model. Those layers are:

  • Layer 7 – Application
  • Layer 6 – Presentation
  • Layer 5 – Session
  • Layer 4 – Transport
  • Layer 3 – Network
  • Layer 2 – Data Link
  • Layer 1 – Physical

Most admins remember these layers by taking the first letter of the layer and matching it with a word. Here are some common ways to remember the OSI model:

  • All People Seem To Need Data Processing
  • Please Do Not Throw Sausage Pizza Away
  • Phew Dead Ninja Turtles Smell Particularly Awful

A common question is, “What application or protocol resides at each of the layers?” Here is a general overview:

Layer 7 - Application
The application layer is where the protocols and services that make up your application reside. Examples of what is located here are: Telnet, File Transfer Protocol (FTP), and Simple Mail Transfer Protocol (SMTP).

Layer 6 - Presentation
The presentation layer “presents” the session layer data to the application. Examples of what is located here are: encryption (like IPSec), ASCII, and JPG.

Layer 5 - Session
This layer is responsible for initiating and terminating network connections. Examples of the session layer are Remote Procedure Call (RPC) functions and the login portion of a SQL session.

Layer 4 - Transport
TCP and UDP work at the transport layer. TCP provides the reliable, in-order delivery of your data, as well as error correction, sequencing, and windowing (flow control). Additionally, TCP at the transport layer provides source and destination port numbers that are commonly associated with applications. For example, TCP port 25 is SMTP, 23 is telnet, 22 is SSH, 80 is HTTP, and so on. These port numbers are very important if you are configuring an ACL (see my article, “What you need to know about Cisco IOS access-list filtering“) or studying for a certification test like the CCNA. Data at the transport layer is called a segment.

Layer 3 - Network
The network layer is where the “IP” part of “TCP/IP” happens. IP is responsible for addressing in the network. Because IP works at layer 3, you could also say that routing and routers work at layer 3. Any data at layer 3 is called a packet.

Layer 2 - Data Link
If you think about a WAN, there are many protocols that work at layer 2 (like PPP and Frame-Relay). However, if you just look at the LAN, the most well-known protocol associated with layer 2 is Ethernet. The Ethernet protocol uses MAC addresses to identify unique devices on the network. Any data at layer 2 is called a frame. Ethernet switches work at layer 2 to switch Ethernet packets. To do this, they keep a MAC address table or CAM table — mapping MAC addresses to switch ports.

Layer 1 - Physical
The physical layer provides the actual connection between devices. Ethernet cables and fiber optic cables work at layer 1. Data goes through the cables via electricity or light. That data is now represented as a bit (a one or a zero).

No comments: