Microsoft Network Monitor capture local

由于Microsoft Network Monitor是基于硬件层面监控底层的网卡数据,所以对于本地的连接(127.0.0.1)并不经过网卡它无法capture。解决方法是为本地连接的IP加一条到网关的路由,这样连本机的IP会先到网关,再由网关转发数据到本机。假设当前IP=192.168.40.104、网关=192.168.40.254,示例如下:
添加路由命令:

route add [destination] mask [netmask] [gateway]
route add 192.168.40.104 mask 255.255.255.255 192.168.40.254

删除路由命令:

route delete [destination]
route delete 192.168.40.104
posted @ 2012-08-10 02:10  junchu25  阅读(326)  评论(0编辑  收藏  举报