From owner-freebsd-questions@FreeBSD.ORG Fri Aug 29 05:27:03 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A289106567B for ; Fri, 29 Aug 2008 05:27:03 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout019.mac.com (asmtpout019.mac.com [17.148.16.94]) by mx1.freebsd.org (Postfix) with ESMTP id 3784B8FC0A for ; Fri, 29 Aug 2008 05:27:03 +0000 (UTC) (envelope-from cswiger@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from [10.152.145.160] ([72.165.115.225]) by asmtp019.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0K6C00AAFKH0QB00@asmtp019.mac.com> for freebsd-questions@freebsd.org; Thu, 28 Aug 2008 22:27:03 -0700 (PDT) From: Chuck Swiger To: EdwardKing In-reply-to: <032001c90994$8cb3e760$3f83a8c0@neusofteaf5839> X-Priority: 3 References: <032001c90994$8cb3e760$3f83a8c0@neusofteaf5839> Message-id: <3DCA0239-52B5-4B04-8FAB-730FBAF85450@mac.com> Date: Thu, 28 Aug 2008 22:27:00 -0700 X-Mailer: Apple Mail (2.928.1) Cc: FreeBSD Subject: Re: Why tcpdump don't work? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 05:27:03 -0000 Howdy-- On Aug 28, 2008, at 10:03 PM, EdwardKing wrote: > I have a server and a client,they use TCP to communication.For > example,when client send a message to server,the server return the > same message to client,then client show it.When client or server > shutdown,it will send FIN.So I want to use tcpdump to watch it. The > server and client in the same machine,the IP is 172.0.10.2 and the > port is 9999 > [ ... ] > when client and server communication or client shutdown,tcpdump > don't show any message! > Why? I am very puzzle with it! How to show server and client tcp > communication information by using tcpdump? If both client and server are running on the same machine, then the network traffic doesn't actually go through your le0 network interface-- instead, it uses the loopback interface, lo0, on IP 127.0.0.1. Try something more like: tcpdump -i lo0 -v tcp port 9999 Regards, -- -Chuck