关于 tcpdump 的问题

关于 tcpdump 的问题

此链接我发现一些关于使用 tcpdump 的信息。

但是,您能否给我提供有关该页面上显示的示例的更多信息:

tcpdump -s 128 -vvv -T rtcp src orac and port 57393

11:58:52.027102 orac.erg.abdn.ac.uk.1053 > 224.2.156.220.57393: sr 489542890 @3238744444.18 2584794646 12583800p 2794620371b 489542890
1l 12646339s 0j @0.00+0.00 sdes 60 489542890 (ttl 127, id 19051, len 140)

11:58:55.772400 orac.erg.abdn.ac.uk.1053 > 224.2.156.220.57393: sr 489542890 @3238744447.93 2585131669 12583837p 2794653187b 489542890
1l 12646376s 0j @0.00+0.00 sdes 60 489542890 (ttl 127, id 19089, len 140)

11:59:00.478495 orac.erg.abdn.ac.uk.1053 > 224.2.156.220.57393: sr 489542890 @3238744452.64 2585555168 12583874p 2794686955b 489542890
1l 12646413s 0j @0.00+0.00 sdes 60 489542890 (ttl 127, id 19127, len 140)

11:59:07.916442 orac.erg.abdn.ac.uk.1053 > 224.2.156.220.57393: sr 489542890 @3238744460.07 2586224502 12583901p 2794700449b 489542890
1l 12646440s 0j @0.00+0.00 sdes 60 489542890 (ttl 127, id 19155, len 140)

11:59:13.840491 orac.erg.abdn.ac.uk.1053 > 224.2.156.220.57393: sr 489542890 @3238744466.00 2586757598 12583931p 2794716009b 489542890
1l 12646470s 0j @0.00+0.00 sdes 60 489542890 (ttl 127, id 19186, len 140)

我不明白在这种情况下符号 > 的具体含义。

先感谢您!

答案1

该字符左侧是源 IP 和端口,右侧是目标 IP 和端口。因此,这意味着转储的数据包从 orac.erg.abdn.ac.uk.1053 发送到 224.2.156.220.57393。该字符本身没有特殊含义。

答案2

danadam 对这个字符的含义理解得非常正确>。这是在 中描述的 TCP 流程man tcpdump

tcp协议行的一般格式为:
              src > dst: 标志数据序列号确认窗口紧急选项

Src 和 dst 是源和目标 IP 地址和端口。标志是 S (SYN)、F (FIN)、P (PUSH)、R (RST)、W (ECN CWR) 或 E (ECN-Echo) 的某种组合,或者是.' (no flags). Data-seqno describes the portion of sequence space covered by the data in this packet (see example below). Ack is sequence number of the next data expected the other direction on this connection. Window is the number of bytes of receive buffer space available the other direction on this connection. Urg indicates there is数据包中的单个“紧急”数据。选项是用尖括号括起来的 tcp 选项(例如)。

因此,tcpdump 的输出会根据协议/层而有所不同。由于您没有该-n标志,因此 src 和 dst 字段是 IP 的 DNS 反向查找,而端口是端口常用用途的简写字母缩写。

我建议使用该-n标志,因为它提供更多的实时输出。

相关内容