tcpdump抓的是哪一层的包?

         tcpdump很强大, 导致有些同学以为它抓的是物理层面上的二进制流, 其实不然。 它抓的是网络层的数据, 如下:

xxxxxx$ sudo tcpdump -iany port 3721 -Xnlps0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
00:58:09.176050 IP 127.0.0.1.51084 > 127.0.0.1.xsync: Flags [S], seq 375088574, win 43690, options [mss 65495,sackOK,TS val 1152656538 ecr 0,nop,wscale 8], length 0
        0x0000:  4510 003c 4124 4000 4006 fb85 7f00 0001  E..

        很显然, 这是一个IP包。

        不多说。


你可能感兴趣的:(s2:,软件进阶,s2:,Linux杂项,s4:,计算机网络)