Capture local packets using Wireshark 使用 wireshark 抓本地包

在Windows系统中,本地到本地的通信通常不会经过网卡,导致Wireshark无法捕获。本文介绍了通过安装Npcap与Wireshark配合,启用Loopback流量捕获的方法,避免了使用路由命令导致的系统效率下降和网络程序运行问题。只需在Wireshark安装过程中选择'Install Npcap',并确保开启Legacy loopback支持和Npcap的WinPcap API兼容模式,就能在Wireshark中看到127.0.0.1到127.0.0.1的包。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一般而言 windows 系統本地到本地ip 的傳輸不會經過網卡,因此無法由 wireshark 捕捉解析,本文介紹 wireshark 同步安裝 Npcap方式,藉此loopback本地ip 到 本地ip

本文 不推薦網傳 route add mask 255.255.255.255 這個方法,因將大幅拖慢系統效率(所有本地到本地的包都要重新入網卡),甚者導致 timeout而無法運行Network program

Generally, data transmission between local IPs on a Windows system does not go through the network card, making it impossible for Wireshark to capture and analyze. This article introduces the method of installing Npcap alongside Wireshark, enabling loopback from local IP to local IP.

This article does not recommend the widely circulated method of adding a route with the mask 255.255.255.255, as it significantly reduces system efficiency (all local-to-local packets have to be re-routed through the network card) and can even cause timeouts, making it impossible to run network programs.

Wireshark select Adapter for

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值