You are confusing the device driver layers and the IP layers of the stack.

At the IP layer, is just another IP address and treated the same.

At the driver layer, packets sent via the loopback interface are "simply and immediately passed back up the network software stack" as opposed to being sent to a network card.

This concept is not OS specific; various OSes use the same concept.

You have confusion between localhost ( and loopback interfaces. Yes, you are confused between the network stack layers.

In computer networks, the lower layers than the network layer is the data link layer and the physical layer. Where is the device driver layer in computer networks?

It claims the concept is not OS specific, so I try my luck here. So did I in the question (Does a loop back IP address not need to be assigned to a network interface, in order to communicate with?) which I want to know the most. Some users on both sites (Unix and Network Engineering) claimed the same questions belong to the other side, saddening me.


  • "In computer networks, the lower layers than the network layer is the data link layer and the physical layer" Only per a completely antiquated and over-simplified system called the OSI model that has very little to do with how things actually work, particularly in the modern age! Mar 24, 2019 at 20:30

2 Answers 2


Tim, you are trying very hard to map abstract concepts to real life hardware and software. They don't map exactly, so you always will have things that don't fit. Software is modularized for ease of coding and troubleshooting, but the divisions between modules don't line up with the concept of network layers. When we talk about software (or hardware) operating at this layer or that layer, we are abstracting their functions. Which piece of code might actually be doing the work is dependent on the particular implementation. It may be based more on the hardware functions, like a device driver. There is no "device driver layer" in the OSI or TCPIP model.

If you ping the loopback address ( or the network interface address, the practical result is the same. It may be that different parts of the operating system software are being used, but that is transparent to you*.

*The one difference is that the network interface can be down (or completely removed for that matter), but the loopback IP will always respond as long as the OS is running.


Your question is very close to being off-topic here due to host-specific details.

A NIC is a physical interface, implementing layers 1 and 2. In order to use it in an OS's harwdare abstraction layer, a driver is required. That driver presents a standardized interface ("upwards") for the OS (or "the stack") to talk to. Also, it contains hardware-specific code ("downwards") to make the hardware do what the OS tells it to.

Accordingly, the driver belongs to layer 2 in the OSI stack. The "device driver layer" is an unconnected OS concept.

I'm not sure if the poster is completely right though. Very commonly, a local or a loopback address is detected within the OS stack, before a packet reaches the driver layer. This however, is definitely host-specific and off-topic here.

An IP address is an address in the network layer, L3.

You check out the numerous Q&A to OSI layering. Each layer has its specific purpose and tasks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.