The Open System Interconnection (OSI) reference model is a framework for defining the conventions and tasks required for network systems to communicate with one another.

The purpose of the OSI model was to assist vendors and communications software developers to produce interoperable network systems

OSI Layer 1 – Physical

The Physical layer of the OSI model is responsible for the transfer of bits — the 1’s and 0’s which make up all computer code.

The actual format of the data on the “wire” can vary with each medium. In the case of Ethernet, bits are transferred in the form of electric pulses. In the case of Wi-Fi, bits are transferred in the form of radio waves. In the case of Fiber, bits are transferred in the form of pulses of light.

OSI Layer 2 – Data Link

The Data Link layer of the OSI model is responsible for interfacing with the Physical layer. Effectively, Layer 2 is responsible for putting 1’s and 0’s on the wire, and pulling 1’s and 0’s from the wire.

The Network Interface Card (NIC) that you plug your Ethernet wire into handles the Layer 2 functionality. It receives signals from the wire, and transmits signals on to the wire.

Your Wi-Fi NIC works the same way, receiving, and transmitting radio waves which are then interpreted as a series of 1’s and 0’s.

Layer 2 will then group together those 1’s and 0’s into chunks known as Frames.

There is an addressing system that exists at Layer 2 known as the Media Access Control address, or MAC address. The MAC address uniquely identifies each individual NIC. Each NIC is pre-configured with a MAC address by the manufacturer; in fact, it is sometimes referred to as the Burned In Address (BIA).

Aside from your NIC, a Switch also operates at this layer. A Switch’s primary responsibility is to facilitate communication within Networks

OSI Layer 3 – Network

The Network layer of the OSI model is responsible for packet delivery from end to end.

It does this by using another addressing scheme that can logically identify every node connected to the Internet. This addressing scheme is known as the Internet Protocol address, or the IP Address.

It is considered logical because an IP address is not a permanent identification of a computer. Unlike the MAC address which is considered a physical address, the IP address is not burned into any computer hardware by the manufacturer.

Routers are Network Devices that operate at Layer 3 of the OSI model. A Router’s primary responsibility is to facilitate communication between Networks. As such, a Router creates a boundary between two networks. In order to communicate with any device not directly in your network, a router must be used.

OSI Model – Layer 2 vs. Layer 3

Both addressing schemes accomplish different functions:

  • Layer 2 uses MAC addresses and is responsible for packet delivery from hop to hop.
  • Layer 3 uses IP addresses and is responsible for packet delivery from end to end.

When a computer has data to send, it encapsulates it in a IP header which will include information like the Source and Destination IP addresses of the two “ends” of the communication.

The IP Header and Data are then further encapsulated in a MAC address header, which will include information like the Source and Destination MAC address of the current “hop” in the path towards the final destination.

OSI Layer 4 – Transport

The Transport layer of the OSI model is responsible for distinguishing network streams.

Layer 4 accomplishes this by using an addressing scheme known as Port Numbers.

Both TCP and UDP have 65,536 port numbers (each), and a unique application stream is identified by both a Source and Destination port (in combination with their Source and Destination IP address).

OSI Layer 5, 6, and 7

The Session, Presentation, and Application layers of the OSI model handle the final steps before the data transferred through the network (facilitated by layers 1-4) is displayed to the end user.