Network Traffic Capture

My VM is running. I use HTTP Scoop to debug Ajax requests, but, unfortunately, with a bridged network and a static IP address, I do not see network activity for my virtual machine.

Is there a configuration change I need to make?

+5
source share
2 answers

Vagrant - a wrapper around VirtualBox. You can use packet capture and analyze it in Wireshark.

Network trace Network problems can be detected by enabling packet logging on the guest side or on the host side, but using VirtualBox's built-in capabilities to create pcap files can provide even more useful information, since the log contains really all packets received and sent by the guest.

To enable network tracing, follow these steps:

VBoxManage modifyvm [your-vm] --nictrace [adapter number] on --nictracefile [adapter number] file.pcap

example

VBoxManage modifyvm "ubuntu" --nictrace1 on --nictracefile1 trace1.pcap

If you are using a stroller, add the following lines to Vagrantfile:

config.vm.customize ["modifyvm", :id, "--nictrace1", "on"]
config.vm.customize ["modifyvm", :id, "--nictracefile1", "trace1.pcap"]

Then open the file trace1.pcapin Wireshark.

+10
source

, wirehark . , wirehark - .

0

All Articles