30

Just as the question says, what is the Microsoft Loopback Adapter, and as a bonus, what scenerios as a developer would it be useful? I've noticed it's been required when installing a couple of applications to my machine, but aside from guessing, I've never have had a sturdy understanding of it's functionality.

I've read a couple of articles online, but nothing really made me "get it". While I don't need a hugely complex answer, a little explaination would be very useful.

Thanks! George

George Johnston
  • 31,652
  • 27
  • 127
  • 172

6 Answers6

27

When sending messages to 127.0.0.1 (or the localhost) the internal network driver typically handles this by shortcutting a few steps.

If you have a networksniffer/protocol analyzer like wireshark, it can not see these shortcutted packets.

By using a loopback adapter, the messages get send much further through the stack, enabling programs like wireshark to capture the packets (and enabling you to analyze the packets)

Toad
  • 15,593
  • 16
  • 82
  • 128
  • 5
    That's the theory, but I can't for the life of me convince WireShark to see data moving across the MS LoopBack interface - GRRR! – Lawrence Dol May 05 '11 at 20:41
  • 2
    @LawrenceDol The latest Wiresharck version (ver. 3.0.1 as of now) comes with the packet capture library [**Npcap**](https://nmap.org/npcap/) which is capable to capture all _loopback_ traffic on Windows the same way as other non-loopback adapters. I am using it without any problem. – informatik01 May 07 '19 at 09:33
14

Well, the best answer I can give you is a few links. http://en.wikipedia.org/wiki/Loopback The key sentence here is

"Any traffic that a computer program sends to the loopback interface is immediately received on the same interface."

http://www.juniper.net/techpubs/software/erx/erx50x/swconfig-system-basics/html/system-mgmt15.html This may be a little more obscure if you don't know networking well.

Basically, it's a fake network interface, useful for tests and stability. In practice, most likely something you'll never have to worry about (or you'd already know about it!)

Trevoke
  • 4,115
  • 1
  • 27
  • 48
  • Does this mean that it would be possible to have an application listening on the loopback adapter for incoming requests, which were sent from the same machine? In essence, would it be possible to proxy traffic on my local machine by having an application listening on the loopback adapter and routing to a *real* network adapter? – George Johnston Jan 07 '10 at 15:46
  • It should be possible. Look at this article talking about load balancing on Server 2k8: http://www-01.ibm.com/support/docview.wss?rs=250&context=SSBQMN&dc=DB520&dc=DB560&uid=swg21304795&loc=en_US&cs=UTF-8&lang=en&rss=ct250websphere (found from http://www.methodicmadness.com/2009/05/server-2008-loopback-adapter-forwarding.html) – Trevoke Jan 07 '10 at 16:11
9

Here's an explanation that might be a bit easier to understand - one I'm working on at the moment.

We (a Bank) are pretty damn secure, as you would expect. One of our third party vendors requires the POS java app that we have to use connect to a 172.x.x.x address. Well, that's not routable.

So we have loopback adapters, one for each of their 172.x.x.x addresses, with the address we will allow as the IP. We then use the "netsh" command to redirect traffic...

So any traffic that access, for example, 172.1.1.1 will get intercepted by Loopback Adapter #1 and redirected to 10.2.2.2. The pain is having one adapter per address.

Hope that makes it a little clearer.

Jon Biddell
  • 91
  • 1
  • 1
2

Some software requires some network functionality, even if the machine in question doesn't have network functionality. The loopback is a dummy network driver, which can have real network protocols bound to it. This allows the software to install properly, even though there isn't a real network card installed in the machine.

Aaron M
  • 2,523
  • 1
  • 23
  • 38
  • The driver is not really meant for this. It is used to feedback any data you send through it, back to itself. – Toad Jan 07 '10 at 15:44
  • 1
    The loopback adapter actually serves a useful function beyond being a dummy network driver. There is some kind of bug in Windows Server 2008 when using Remote Access and VPN where certain file sharing ports are internally blocked on certain adapters, and the only way around it is to route through the loopback adapter. For some reason, the restrictions don't apply to it, and everything works. See my post and answer here: http://serverfault.com/questions/462456/how-to-access-vpn-server-itself-over-a-vpn-set-up-with-ras – Triynko Oct 08 '13 at 22:47
0

A loopback adapter is required if you are installing on a non-networked computer to connect the computer to a network after the installation.

When you install a loopback adapter, the loopback adapter assigns a local IP address for your computer. After the loopback adapter is installed, there are at least two network adapters on your computer: your own network adapter and the loopback adapter. You can change the bind order for the adapters without reinstalling the loopback adapter. The bind order of the adapters to the protocol indicates the order in which the adapters are used. When the loopback adapter is used first for the TCP/IP protocol, all programs that access TCP/IP first probe the loopback adapter. T

B31337
  • 1
-1

It is mostly used if you have programs that have an expiration date, so that it keeps working.

Bruno
  • 1