Tcpreplaying using VMware

I haven't tried this in VMware Workstation lately, but typically this is a result of one of the following:

  1. The VM you are trying to capture from isn't putting the NIC in promiscuous mode, so can't see packets that aren't destined for it. You can solve this by either running tcpdump as root in the VM or by changing your tcpreplay to use the MAC address of the VM as the destination for the packets it is sending (tcpreplay comes with tcprewrite, which makes this sort of change easy). Alternately, you could make the dest MAC address of the packets being replayed the broadcast address, ff:ff:ff:ff:ff:ff (WARNING: VERY DANGEROUS. Unless you really understand what you are doing, I recommend unplugging from the physical network before doing this).

  2. The host isn't allowing the VM to put the interface into promiscuous mode. I'm not sure how to adjust this in VMware Workstation, but in ESX[i] there is an option on the vSwitch for "Allow Promiscuous Mode". You could also work around this by changing the destination MAC address of the tcpreplay stream as mentioned in 1.

  3. The permissions on the vmnet in the host aren't correct to allow promiscuous mode to work (assuming you are using Linux as the host OS). There are a bunch of VMware KB articles on this, and solving it is inconsistent at best. You might be able to do it by chmodding the /dev/vmnetX interface to 777, but you are probably better off just making your replay traffic destined for the MAC of the VM if one of the other answers doesn't solve it first.

Good luck,

--jed