当前位置:网站首页>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.

边栏推荐
- Image compression failure problem
- What?CDN cache acceleration only works for accelerating static content?
- 网络布线与数制转换
- What should I do if the SSL certificate prompts that it is expired or invalid?
- VLAN details and experiments
- spark operator-wholeTextFiles operator
- [Day8] (Super detailed steps) Use LVM to expand capacity
- [问题已处理]-jenkins流水线checkout超时
- Disk management and file systems
- 【Day8】Knowledge about disk and disk partition
猜你喜欢

The problem of calling ds18b20 through a single bus

单臂路由与三成交换机

教您简单几步实现工业树莓派正确安装RS232转USB驱动

VLAN详解及实验

Cloud computing - osi seven layers and TCP\IP protocol

Getting Started Documentation 10 Resource Mapping

What's the point of monitoring the involution of the system?

Getting Started 05 Using cb() to indicate that the current task is complete

network issue?Service packet loss?This is enough

Hugo builds a personal blog
随机推荐
What are some things that you only know when you do operation and maintenance?
Spark source code-task submission process-6.1-sparkContext initialization-create spark driver side execution environment SparkEnv
js动态获取屏幕宽高度
正则表达式小实例--验证邮箱地址
Image compression failure problem
正则表达式小示例--获取重复最多的字符及其数量
flink cdc 目前支持Gauss数据库源吗
时间复杂度和空间复杂度
IP数据包格式(ICMP协议与ARP协议)
User and user group management, file permission management
The spark operator - coalesce operator
7步完成云上监控
交换机原理
Logical volume creation
One-arm routing and 30% switch
增长:IT运维发展趋势报告
What?CDN cache acceleration only works for accelerating static content?
Hard Disk Partitioning and Permanent Mounting
Tencent greetings function SCF - entry instructions
[Day5] Soft and hard links File storage, deletion, directory management commands