No loopback interface on Windows (XP)

Learned today that Windows doesn’t support a loopback interface for localhost. In consequence, network packets destined for the local machine are never passed to any interface and therefore can’t be captured by a packet sniffer. Unfortunately, looking at the network is my preferred way of diagnosing network problems, so this behavior gets in the way. An easy workaround is to route packets to a local address to the standard gateway instead. The gateway then sends the packets back to the local machine. This is a bit of a detour, but at least the traffic shows up. This dramatically changes how the packets are being moved around, so it might not help… But just in case:

  1. grab your IP address and Gateway using ipconfig in a DOS box.
  2. route add $LOCAL_IP mask 255.255.255.255 $GATEWAY_IP metric 1
  3. when you’re done, use route delete $LOCAL_IP to get things back to normal

2 Kommentare zu „No loopback interface on Windows (XP)“

  1. Polzifer sagt:

    Well, it has to be installed by hand, the loopback device. I really think Micro$ is evil;)

    Link:
    http://www.windowsnetworking.com/articles_tutorials/Install-Microsoft-Loopback-adapter-Windows-XP.html

  2. Opfer sagt:

    Windoof 2000 besitzt/besas das Feature mit dem fehlenden loopback auch.
    Echt nervig, wenn man an einem kleinen Hobbyprojekt programmiert und die Kommunikation zwischen seinen zwei Programmen zu debugginzwecken sniffen will und von Linux das tolle loopback gewohnt ist.
    Auf einmal kommt unter Windoof halt gar nichts an und man zweifelt schon an seinen bescheidenen Programmierkenntnissen… und so starb mein Projekt letztendlich.