Traditional packet capture tools in windows, such as Wireshark/ethereal, cannot capture packets for network communication between local programs. Some commercial packet capture tools use Winsock LSP (Layered Service Provider) the technology implements packet capture for network communication between local programs. If you want to capture packets for local communications and use Wireshark/ethereal, you will have to pay a weekly discount.
Http://wiki.wireshark.org/CaptureSetup/Loopback
Describes in detail how to perform the operation. The actual operation is actually very simple, divided into five steps:
1 According to this http://support.microsoft.com/kb/839013
This section describes how to install the loopback NIC Driver.
2 3. Set an IP address for the new Nic, for example, 192.168.0.100 and 255.255.255.0.
3. view the MAC address ipconfig/all of the new Nic In the command line.
Ethernet Adapter local connection 2:
Connection-specific DNS suffix .:
Description ......: Microsoft loopback Adapter
Physical address ......: 02-00-4c-4f-4f-50
DHCP enabled...
IP address ......: 192.168.0.100
Subnet Mask ......: 255.255.255.0
Default Gateway .........:
4 Add ARP binding, such as ARP-s 192.168.0.100 02-00-4c-4f-4f-50
5. Add a route, for example, route add 192.168.0.100 mask route 255.255.255 192.168.0.100.
Then, Ping 192.168.0.100 and capture packets. When capturing packets, select the newly installed loopback Nic. That's easy!