Operating System - HP-UX
1820260 Members
2939 Online
109622 Solutions
New Discussion юеВ

tcpdump and local packet capturing

 
Marc Bohnert
Advisor

tcpdump and local packet capturing

How do I capture the IP packets from client to server when both ends exist on the same server. The packets do not go through the interface but are routed internally.

HPUX 11

Thanks
2 REPLIES 2
The Real MD
Valued Contributor

Re: tcpdump and local packet capturing

try using localhost or 127.0.0.1 as the host your listening to.

tcpdump host localhost

Regards

Martin.
Mika Sipila
New Member

Re: tcpdump and local packet capturing

Currently it's not possible. tcpdump (or actually libpcap) won't listen to lo0 because it can't find /dev/lo0. My system at least is missing the loopback interface device file.

The correct syntax would be tcpdump -i lo0
If -i is not specified, tcpdump will use the lowest network interface found (usually lan0).

Plaese speak out if you know some way to tweak this.