0

I have two communicating applications on the same machine:

app1----->loopback------>app2

I applied some delay (100ms) to loopback interface using netem (tc command) on a ubuntu machine (mint to be more specific). So to verify, if I ping 127.0.0.1, response is delayed 200ms.

I am wondering if it is possible to capture the traffic before the delay is applied and after the delay is applied. In other words, capture when app1 sends it into the network interface and capture again before app2 receives it.

Would that be possible using tcpdump/Wireshark?

Volverine
  • 83
  • 6

1 Answers1

0

Packets sent to loopback interface are loop backed to application from L3 and will not sent it over real network interface. Not all platforms capture packets on loopback, check this wireshark loopback capture setup.

Sunil Bojanapally
  • 12,528
  • 4
  • 33
  • 46
  • Wireshark/tcpdump can indeed capture on loopback on linux. However, from my tests it is capturing after the delay is applied. netem applies the delay before it hits the interface.. I guess the question is, can netem or similar tool, capture and output the packets into a useful file before the packets hit the NIC/loopback.. – Volverine Feb 06 '14 at 22:22
  • What if we send to another server. Again how can we use tcpdump before netem – Masood_mj Apr 18 '15 at 04:36