Different Network Layers

Sun, 09/16/2012 - 11:27 -- jamie

There is more than one model that can be used to describe the layers of a network. Most text books break it down into seven layers, using the OSI protocols.

For understanding networking purposes, I find the Internet Protocol Suite division much more useful, which is what I'll describe a version of below.

Link layer

The first layer is called the "link" layer. When you plug two computers, via an ethernet cable, into the same switch you are connecting them at the link layer. Similarly, when two computers connect via wifi to the same wireless access point, they are connecting at the link layer.

At this layer, you don't need an IP address to communicate. Instead, each device has a globally unique address known as a MAC address. If your network device understands Ethernet, then each device can query and announce it's MAC address and communicate with each other via this unique address.

Since this form of communication requires certain communication to be broadcast to every device on the network, it doesn't scale very well. Furthermore, it doesn't work if you need to communicate with a device that is not attached to the same router or wireless access point.

Internet Layer

The Internet layer allows computers to communicate with each other even if they are not connected to the same network. As the name suggests, it requires computer to be assigned "IP addresses" (aka 192.168.0.32). This layer of the network stacks allows "routing" - sending of packets between two different local networks (or subnets).

Transport Layer

The transport layer specifies how two endpoints will communicate. In other words the Internet layer gets the packets to their destination, while the transport layers defines how this communication will happen. TCP is the most well-known transport layer, which defines a series of steps for communication to take place (e.g. the sender says "Hi" and the received then must respond saying that it received the "Hi", etc.). UDP is another transport layer protocol that is far simpler, without any requirements that the receiver of a packet must acknowledge receipt.

Application Layer

The application layer is specific to certain programs. http, smtp and imap are examples of an application layer protocols.