当前位置:网站首页>Wireshark packet capture and common filtering methods
Wireshark packet capture and common filtering methods
2022-08-05 06:20:00 【cql_cqu】
1. Packet capture
When you actually encounter an error reporting problem between component services, you cannot quickly see the reason through the log. You can quickly view the interface return information and error prompts by capturing packets. Use the following commands to capture packets on a port:
tcpdump -i any -w /opt/xxx.pcap tcp port 8150 # 8150 is the port number of the calling interface
Second, common filtering methods
After capturing the tcp protocol packets through the above command, use Wireshark to open the xxx.pcap file, and enter the corresponding filter expression in the filter box (Fileter) to quickly filterThe request message between the interfaces you want to see:
1. Filter source (source) ip and destination (destination) ip
Enter in Filter: ip.src==127.0.0.1, which can filter out the packet information whose source ip is 127.0.0.1;
Enter in Filter: ip.src==127.0.0.1, which can filter out the message information whose target ip is 127.0.0.1;
Enter in Filter: ip.src==127.0.0.1 and ip.dst==127.0.1.1, which can filter out the source ip as 127.0.0.1 and the destination ip as127.0.1.1 message.
2. Port filtering
Enter in the Filter: tcp.port==80, filter out the source port and the destination port are 80;
Enter in Filter: tcp.dstport==80, only filter the target port of 80;
Enter in Filter: tcp.srcport==80, only filter the source port of 80.
3. Protocol filtering
Enter in Filter: the protocol name and press Enter.
4. Request protocol filtering
Enter in Filter: http.request.method=="GET", filter the get mode message;
Enter in Filter: http.request.method=="POST" to filter post-mode messages.
5. Connector and
When filtering two conditions, you can use and connection:
Enter ip.src==127.0.0.1 and http in Filter to filter out packets with source ip of 127.0.0.1 and http protocol at the same time.
边栏推荐
- Introductory document 05-2 use return instructions the current task has been completed
- The highlight moment of operation and maintenance starts with intelligence
- VRRP principle and command
- 单臂路由与三成交换机
- Hugo builds a personal blog
- User and user group management, file permission management
- 618, you may be able to wake up a little bit
- spark operator-parallelize operator
- 从“双卡双待“到”双通“,vivo率先推动DSDA架构落地
- Technology Sharing Miscellaneous Technologies
猜你喜欢
What?CDN cache acceleration only works for accelerating static content?
Transport layer protocol (TCP 3-way handshake)
In-depth Zabbix user guide - from the green boy
解决这三大问题,运维效率将超90%的医院
传输层协议(TCP3次握手)
vim的三种模式
markdown editor template
Getting Started Document 09 Standalone watch
Technology Sharing Miscellaneous Technologies
线上问题排查流程
随机推荐
I217-V network disconnection problem in large traffic under openwrt soft routing
用户和用户组管理、文件权限管理
Transport layer protocol (TCP 3-way handshake)
IP地址及子网的划分
NAT实验
Getting Started 03 Distinguish between development and production environments ("hot update" is performed only in the production environment)
Spark source code-task submission process-6.1-sparkContext initialization-create spark driver side execution environment SparkEnv
Getting Started Document 09 Standalone watch
Spark source code - task submission process - 4-container to start executor
VRRP概述及实验
js动态获取屏幕宽高度
微信小程序页面跳转传参
Mina的长连接和短连接
[Day1] VMware software installation
Hugo搭建个人博客
[问题已处理]-虚拟机报错contains a file system with errors check forced
Regular expression small example - get number character and repeated the most
交换机原理
Proprietary host CDH
Logical volume creation