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

边栏推荐
- ALC实验
- [问题已处理]-jenkins流水线checkout超时
- 传输层协议(TCP3次握手)
- Mina断线重连
- Three modes of vim
- [Day5] Soft and hard links File storage, deletion, directory management commands
- [ingress]-ingress使用tcp端口暴露服务
- 请问下通过flink sql读取hologres 的两张表的 binlog,然后如何进行join?
- Getting Started Document 01 series in order
- IP packet format (ICMP protocol and ARP protocol)
猜你喜欢
随机推荐
VLAN details and experiments
Hugo搭建个人博客
产品学习资料
I/O performance and reliability
干货!教您使用工业树莓派结合CODESYS配置EtherCAT主站
To TrueNAS PVE through hard disk
IP address and subnet division
千亿IT运维市场,产品要凭实力说话
Image compression failure problem
LeetCode Interview Questions
传输层协议(TCP3次握手)
618, you may be able to wake up a little bit
Disk management and file systems
spark operator - map vs mapPartitions operator
通过反射获取Class对象的四种方式
spark operator-parallelize operator
Network wiring and digital-to-system conversion
I/O性能与可靠性
Apache configure reverse proxy
spark source code - task submission process - 2-YarnClusterApplication








