Listing 5. Usage patterns for the tcpdump tool.
清单5. tcpdump工具的用法模式。
Start the tcpdump command in the server as follows.
在服务器上启动tcpdump命令。
Tcpdump continues to capture packets until you hit Ctrl + c.
tcpdump将持续地捕获数据包,直到您键入Ctrl +c为止。
S 0 tells tcpdump that you want all data in every packet body.
s0告诉tcpdump您想得到每个数据包主体中的所有数据。
A couple of usage patterns for tcpdump are shown in Listing 5.
清单5显示tcpdump的两个用法模式。
With tcpdump, you can also limit the amount of data to be traced.
使用tcpdump,您还可以限制要跟踪的数据的总量。
The Net::TcpDumpLog parses the raw network data saved by tcpdump.
TcpDumpLog 会解析tcpdump 所保存的原始网络数据。
This is where tracing tools come in handy, such as iptrace, ipreport, and tcpdump.
在这种情况下,可以使用各种跟踪工具,比如iptrace、ipreport和tcpdump。
To do this, you will use a tool called tcpdump (see the Resources section below for a link).
为此,您将使用一个名为tcpdump的工具(请参阅下面的参考资料部分以获得一个链接)。
The man pages for tcpdump are also an excellent resource for learning to read these files.
tcpdump的主页是一个很好的资源,可以帮助您阅读这些文件。
Then, use tcpdump to display packets sent to the host using the example shown in Listing 16.
然后,使用tcpdump显示发送到目标主机的数据包,见清单16中的示例。
The message packets between client and server can be traced using the tcpdump command in AIX.
在AIX中,可以使用tcpdump命令跟踪客户机和服务器之间传输的消息包。
The article describes these utilities, including tools such as iptrace, ipreport, and tcpdump.
本文将描述这些实用工具,包括iptrace、ipreport和tcpdump。
The -i lo option tells tcpdump what interface to listen on (the loopback device, in this case).
i lo选项告诉tcpdump要侦听哪个接口(在这个例子中要侦听回送设备)。
Then, use tcpdump to display packets received from the host using the example shown in Listing 17.
然后,使用tcpdump显示从此主机接收的数据包,见清单17。
The transaction between the client and server should be completed and then the tcpdump can be killed.
客户机和服务器之间的事务完成之后,可以停止tcpdump进程。
The process for downloading and installing tcpdump will vary based on your OS, so we will not cover that here.
下载和安装tcpdump的过程将根据您的操作系统有所不同,所以我们在此不作介绍。
One important difference with tcpdump is that, unlike iptrace, it can look at only one network interface at a time.
tcpdump与iptrace的一个重要区别是,它一次只能查看一个网络接口。
You can do this either by typing an expression (like those provided to tcpdump, snoop or iptrace) into the Filter box.
您可以通过在Filter输入框中输入一个表达式(类似于 tcpdump、snoop或iptract)。
If you want tcpdump to keep only a set number of bytes per packet, enter the number of bytes desired in place of zero here.
如果您想让tcpdump只保持每个数据包一定数量的字节,请输入所期望的字节数来代替此处的零。
The tcpdump and tcpflow tools give you a huge number of options, including the ability to create complex filter expressions.
tcpdump和tcpflow工具有大量的选项,包括创建复杂过滤表达式的能力。
Also, you do not need to use an ipreport type of command to format binary data, because tcpdump does the trace and the output.
另外,您不需要使用ipreport类型的命令来格式化二进制的数据,因为tcpdump将进行跟踪并产生格式化的输出。
Use tcpdump to display packets sent to and received from the host on the specified port using the example shown in Listing 12.
使用tcpdump显示发送到主机上的指定端口或从其接收的数据包,见清单12中的示例。
As shown in this article, using tools like tcpdump, snoop or iptrace, you can extract a wide range of data at the command line.
如本文所述,通过使用诸如tcpdump、snoop或iptrace的工具,您可以在命令行上提取大量的数据。
For example, snoop and tcpdump both provide detailed information on different protocols under both UDP and TCP to varying levels.
例如,snoop和tcpdump都提供了关于UDP和tcp上不同协议的不同级别的详细信息。
Note that the command line above is for a Linux machine, and that you may need to run tcpdump with root or administrator permissions.
请注意,上面的命令行适用于Linux机器,并且您可能需要拥有root权限或管理员权限才能运行tcpdump。
When you are testing the applications, you will use the following options on tcpdump to siphon the messages off into a temporary file.
当您测试应用程序时,您将使用下列tcpdump选项将消息抽取出来保存到临时文件中。
The tcpdump tool is an older tool that "sniffs" network packets from a network and either prints them to stdout or logs them to a file.
tcpdump工具是一个比较老的工具,它从网上“嗅探”网络数据包,打印到stdout或记录在一个文件中。
Suppose you execute the following command on your localhost, 192.168.2.64: tcpdump -i eth0 -X -s 3000 host 192.168.2.100 and port 5432.
假设您在自己的本地主机 192.168.2.64 上执行以下命令:tcpdump-ieth0 -X-s 3000host 192.168.2.100 and port 5432。
Suppose you execute the following command on your localhost, 192.168.2.64: tcpdump -i eth0 -X -s 3000 host 192.168.2.100 and port 5432.
假设您在自己的本地主机 192.168.2.64 上执行以下命令:tcpdump-ieth0 -X-s 3000host 192.168.2.100 and port 5432。
应用推荐