15

First things first: I know that you can install a sort-of-a Loopback Adapter in Windows.

But what I really found strange is that there exists nothing like lo on Windows. At all. From The missing network loopback interface:

Windows TCP/IP stack does not implement a network loopback interface, as found in other TCP/IP stack like lo* interfaces in BSD systems.

...

The Microsoft Loopback Adapter can be installed on Windows systems, to run network applications when no physical adapter is present or active on the system. This adapter is not the equivalent of a network loopback interface and IPv4 address 127.0.0.1 can not be assigned to it. Also, it is not possible to sniff network traffic on it, at least with WinPcap.

I'd be really interested if somebody knew why this choice was made or why it never seemed necessary to include a loopback device in Windows. Because it comes in so handy to be actually able to capture packets you send from/to it in order to develop or debug network applications.

So if anybody has an experience in networking, TCP/IP stacks, etc. and is able to provide some insight, that would be much appreciated.

5
  • Its there, just not installed by default in Windows...sevenforums.com/network-sharing/…
    – Moab
    May 4, 2011 at 20:16
  • @barlop No, it's not programming related. My question is why they chose not to implement it in a "proper" or otherwise useful way. Wireshark can't pick it up as WinPcap can't.
    – slhck
    May 5, 2011 at 8:20
  • don't know, maybe no good reason. But there is a method here mentioned on how to sniff it anyway, with a workaround, adding a route to the routing table which sends local stuff to the gateway which then comes back.. something like that anyway. wiki.wireshark.org/CaptureSetup/Loopback and some commercial programs are mentioned too. And mentions a probably free program called Proxocket and something that may do it with powershell.
    – barlop
    May 5, 2011 at 12:38
  • @barlop Yeah, maybe, maybe there was a design choice, that's why I asked :) Thanks for the link, but I already know this article.
    – slhck
    May 5, 2011 at 12:47
  • Run "route print" ... and observe "Software Loopback Interface 1" in the list. :) So it is there, but not quite in the same way as other network interfaces.
    – user314104
    Jan 14, 2015 at 17:43

3 Answers 3

12

Historical reasons. From the ground up unix/linux has always been about the network. Whereas MS-DOS/Windows bolted the network on as an afterthought, initially with Windows own 'NetBIOS' rather than TCPIP.

Only when Netscape came along was it necessary for Microsoft to install a TCPIP stack and acknowledge the presence of the Internet. Before then you had to put your own stack together for talking to unix machines, paying handsomely for the privilege.

I hope this historical context goes some way to helping you understand why it is that MS-Windows is not really there yet when it comes to proper networking. To take a car analogy it is a bit like asking why motorbikes don't have four wheels. (Yes, that is a very poor analogy...)

Before it became important to get online there were many LAN protocols - DECnet, Token Ring, Novell stuff and Microsoft's effort that came with Windows 3.11 - only true experts could get these different boxes to talk together and networking was a truly dark art.

2
  • 1
    "From the ground up" - are you sure that the very first versions of Unix had networking capability? Also, at the time of Netscape, Microsoft did not have a TCPIP stack - you had to install your own. Jan 24, 2015 at 17:50
  • Unix had some networking capability even in its early days, but not like the TCP/IP stack today, but still it was installed on a mainframe which was accessed by quite simple clients called terminals.
    – atevm
    Feb 13 at 12:54
3

Ten years later I stumbled upon this problem as well. To share it with the community here is what I've researched so far.

The first hint I have found at the comment from user314104 to the question. You will see the Software Loopback Interface 1 for example from my MS Windows 10 with:

PS C:\Users\ingo\devel> route print
===========================================================================
Interface List
 10...52 54 00 ab b0 be ......Realtek RTL8139C+ Fast Ethernet NIC
 15...52 54 00 68 79 e4 ......Realtek RTL8139C+ Fast Ethernet NIC #2
  1...........................Software Loopback Interface 1
===========================================================================
--- snip ---

I also find it if I query it with the GetAdaptersAddresses function. I don't know why Microsoft is hiding it when showing interfaces with ipconfig.

As mentioned at How do I change the IP address of loopback in Windows 10? you can just ping the loopback:

PS C:\Users\ingo\devel> ping -4 loopback

Pinging win10-devel.hoeft-online.de [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

PS C:\Users\ingo\devel> ping -6 loopback

Pinging win10-devel.hoeft-online.de [::1] with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms

Ping statistics for ::1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

To answer your question: Microsoft has implemented a loopback interface in Windows but hidding it for some reason. You should be able to use it for testing as usual.

3

Windows does have a loopback interface; you'll see it if you run route print from the command line.

The real question seems to be why it's not possible to sniff loopback traffic on Windows, and the answer is that it is, just not with WinPcap. Npcap can capture loopback traffic. The Wireshark wiki now recommends it over WinPcap, partly for that reason and partly because WinPcap hasn't been maintained in years. (In 2011 when this question was written, WinPcap was maintained and Npcap didn't exist yet.)

I don't know why Microsoft implemented loopback in a way that happened to bypass WinPcap's capture method, but I'd guess it was for performance reasons. It certainly isn't because early Windows versions had no TCP/IP stack, as the top-voted rantswer claims. That doesn't even make any sense.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .