网络配置优化与资源整合指南
1. 使用tcpdump监控网络流量
在网络配置中,我们可以使用 tcpdump 工具来监控特定接口的TCP流量。例如,要监控 xl0 接口上的TCP流量,但不显示SSH和SMTP流量,并以非常详细的模式输出结果,可以使用以下命令:
$ sudo tcpdump -nvvvpi xl0 tcp and not port ssh and not port smtp
执行该命令后,会显示如下类似的输出:
tcpdump: listening on xl0, link-type EN10MB
21:41:42.395178 194.54.107.19.22418 > 137.217.190.41.80: S [tcp sum ok]
3304153886:3304153886(0) win 16384 <mss 1460,nop,nop,sackOK,nop,wscale 0,nop,nop,timestamp
1308370594 0> (DF) (ttl 63, id 30934, len 64)
21:41:42.424368 137.217.190.41.80 > 194.54.107.19.22418: S [tcp sum ok]
1753576798:1753576798(0) ack 3304153887 win 5792 <mss 1460,sackOK,timestamp 168899231
1308370594,nop,wscale
超级会员免费看
订阅专栏 解锁全文
1289

被折叠的 条评论
为什么被折叠?



