第一步: 进入pod的内部:找到网卡if36373
kubectl exec -it dragonfly-dfdaemon-2npdh -n dragonfly-system sh
/
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
3: eth0@if36373: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue state UP
link/ether c6:d7:2d:dc:f4:f1 brd ff:ff:ff:ff:ff:ff
inet 10.244.1.240/24 brd 10.244.1.255 scope global eth0
valid_lft forever preferred_lft forever
第二步:进入pod所在的node上面
ip a | grep 36373
36373: vethc7363708@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default
ifconfig vethc7363708
vethc7363708: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80::84a2:a6ff:fe3d:a96 prefixlen 64 scopeid 0x20<link>
ether 86:a2:a6:3d:0a:96 txqueuelen 0 (Ethernet)
RX packets 82031 bytes 7288953 (6.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 89394 bytes 289109004 (275.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
第三步:开始抓包
tcpdump -i vethc7363708 -nnn (抓所有的包)
tcpdump -i vethc7363708 -nnn | grep 10.244.2.76 (抓包进行过滤)
|