First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Client-server communication on localhost not showing up

  • retag add tags

Hello, I'm trying to capture packets from a client-server communication on localhost (on the same computer). None of the network interfaces show this. When I connect the client to a remote server though, Wireshark is able to capture the transmitted packets.

How can I visualise the packets exchanged between client and server on the same host? While I can run each on a different computer, for debugging purposes it's easier to test both locally.

Any help welcome.

Regards, Ed

EdS's avatar
1
EdS
asked 2020-02-14 12:57:56 +0000
edit flag offensive 0 remove flag close merge delete

Comments

Please add output of wireshark -v or Help->About Wireshark
That will include information about the host and the capture library.

Chuckc's avatar Chuckc (2020-02-14 14:40:30 +0000) edit

Hi. I've just realized that wireshark shows protocol S101 when running the system under loopback. Why? When server and client are on different computers, protocol is informed correctly

EdS's avatar EdS (2020-02-15 16:00:26 +0000) edit

In the capture done on the local system using loopback, what are the src and dst ports?
Wireshark has a preference (s101.tcp.port) default value to decode port 9000 as S101.

Chuckc's avatar Chuckc (2020-02-16 04:10:34 +0000) edit
add a comment see more comments

1 Answer

0

When the client and server are on the same computer, the networking stack uses an optimization (or shortcut) and the TCP or UDP traffic does not go down the stack to the NIC but is directly routed to the receiving application. This is often termed loopback traffic.

This means that applications such as Wireshark, using a capture driver of npcap or WinPcap, that (effectively) capture just above the NIC, don't see the traffic.

A loopback adaptor allows a capturing application to see the loopback traffic.

grahamb's avatar
23.8k
grahamb
answered 2020-02-15 16:08:47 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer