This wiki has been migrated to https://gitlab.com/wireshark/wireshark/-/wikis/home and is now deprecated. Please use that site instead.
Differences between revisions 21 and 22
Revision 21 as of 2007-08-13 08:45:36
Size: 4667
Editor: eu212-87-122-220
Comment:
Revision 22 as of 2007-10-03 22:58:46
Size: 4719
Editor: GuyHarris
Comment: Clean up See Also titles; mark as a HowTo page.
Deletions are marked like this. Additions are marked like this.
Line 47: Line 47:
 * [:CaptureSetup/FrameRelay:Frame Relay Capture setup]
 * [:CaptureSetup/DOCSIS:DOCSIS Capture setup]
 * [:CaptureSetup/Bluetooth:Bluetooth Capture Support]
 * [:CaptureSetup/FrameRelay:Capturing on Frame Relay Networks]
 * [:CaptureSetup/DOCSIS:Capturing DOCSIS Traffic]
 * [:CaptureSetup/Bluetooth:Capturing Bluetooth Traffic]
Line 51: Line 51:
 * [:CaptureSetup/USB:Capturing USB]
 * [:CaptureSetup/IrDA:Capturing IrDA Traffic Capture]
 * [:CaptureSetup/CiscoHDLC:CiscoHDLC Capture]
 * [:CaptureSetup/SS7:SS7 Traffic Capture]
 * [:CaptureSetup/USB:Capturing USB Traffic]
 * [:CaptureSetup/IrDA:Capturing IrDA Traffic]
 * [:CaptureSetup/CiscoHDLC:Capturing on Cisco HDLC Networks]
 * [:CaptureSetup/SS7:Capturing SS7 Traffic]
----
CategoryHowTo

Loopback capture setup

The following will explain capturing on loopback interfaces a bit.

If you are trying to capture traffic from a machine to itself, that traffic will not be sent over a real network interface, even if it's being sent to an address on one of the machine's network adapters. This means that you will not see it if you are trying to capture on, for example, the interface device for the adapter to which the destination address is assigned. You will only see it if you capture on the "loopback interface", if there is such an interface and it is possible to capture on it; see the next section for information on the platforms on which you can capture on the "loopback interface".

Supported Platforms

See [http://www.wireshark.org/media.html Wireshark: Supported Capture Media] page for Wireshark capturing support on various platforms. Summary: you can capture on the loopback interface on Linux, on various BSDs including Mac OS X, and on Digital/Tru64 UNIX, and you might be able to do it on Irix and AIX, but you definitely cannot do so on Solaris, HP-UX, or Windows.

Windows

You can't capture on the local loopback address 127.0.0.1!

You can add a virtual network card called Microsoft Loopback Adapter, but in most cases that might not give results as expected either.

This adapter is available from Microsoft:

... and is quite different than the ones available for various UN*X systems. This adapter is a virtual network adapter you can add, but it will not work on the 127.0.0.1 IP addresses; it will take its own IP address. BTW: You can only add one Loopback Adapter to the system!

/!\ Beware: Capturing from this Loopback Adapter requires the WinPcap 3.1 release, 3.1 beta versions won't work!

Let's suppose you have set the IP address of the loopback adapter to 10.0.0.10 and are capturing on that interface. If you ping to this 10.0.0.10 address the ping will get ping replies, but you won't see any of this traffic in Wireshark (much like the 127.0.0.1 problem). If you ping on 10.0.0.11, you won't get ping replies as there is obviously no remote host, but you will see the corresponding ARP requests in Wireshark.

The only benefit I can see so far is if you use it with colinux (and probably other PC virtualization software) to capture the traffic between Windows and the virtual machine. - UlfLamping

:) Recipe (to capture traffic on ms loopback adapter / Windows XP): --- by mitra

1. go to MS Loopback adapter properties, set IP 10.0.0.10, MASK 255.255.255.0
    adapter/additional/network address: 55-55-55-55-55-55
2. arp -s 10.0.0.10 55-55-55-55-55-55
3. route add 10.0.0.10 10.0.0.10 mask 255.255.255.255
4. to test: "telnet 10.0.0.10"

{OK} I am now using the loopback adapter to capture traffic that I source into a Dyanmips/Dynagen virtual router network. This is a potentially very useful tool/feature that I will be testing further in the weeks to come. As it stands, I can connect my loopback adapter to a virtual router interface and capture ping, arp, etc. In the near future, I hope to tie a server w/ a loopback adapter to a virtual router and then capture a full client/server type of exchange across a Dynamips/Dynagen emulated network. -- Scott Vermillion

Alternatives

A commercial network sniffer called CommView (from TamoSoft) allows to capture packets on the localhost network adapter but it dissects less protocols, so you can capture packets with CommView and save them into a file and open it with WireShark.

See Also

  • [:CaptureSetup/Ethernet:Capturing on Ethernet Networks]

  • [:CaptureSetup/WLAN:Capturing on 802.11 Wireless Networks]

  • [:CaptureSetup/TokenRing:Capturing on Token Ring Networks]

  • [:CaptureSetup/VLAN:Capturing on VLAN Protected Networks]

  • [:CaptureSetup/PPP:Capturing on PPP Networks]

  • [:CaptureSetup/FrameRelay:Capturing on Frame Relay Networks]

  • [:CaptureSetup/DOCSIS:Capturing DOCSIS Traffic]

  • [:CaptureSetup/Bluetooth:Capturing Bluetooth Traffic]

  • [:CaptureSetup/ATM:Capturing on ATM Networks]

  • [:CaptureSetup/USB:Capturing USB Traffic]

  • [:CaptureSetup/IrDA:Capturing IrDA Traffic]

  • [:CaptureSetup/CiscoHDLC:Capturing on Cisco HDLC Networks]

  • [:CaptureSetup/SS7:Capturing SS7 Traffic]


CategoryHowTo

CaptureSetup/Loopback (last edited 2020-01-30 19:15:46 by ChristopherMaynard)