Connecting a physical ethernet port to a VMware virtual switch?

Solution 1:

Hmm. I believe that your best bet may be to bridge your VM onto the private network NIC that your physical device is connected to and use NAT (Internet connection sharing in Windows, iptables in Linux) to provide internet access to the two boxes.

I'll try to elaborate.. I apologize in advance for not being very good with descriptions:

  • Configure the NIC in the PC for the private network. Here is where you'd want to set up the internet connection sharing if you're using windows. How that's done depends on what version of windows you're running. If you're not running windows, there's iptables NAT in Linux. I'm not familiar enough with OSX to know how to set up NAT. I suspect it's similar to Linux. Another search on here should provide information on how to do this. (EDIT: For Windows, as soon as you share the connection of your NIC in the public network to the one in the private network, the NIC in the private network is assigned a static IP address by windows which doesn't neccessarily match your private network's configuration. Just change the IP accordingly and also set your computer's IP in the private network as the preferred DNS server and you're good to go. – Tobias Gies)

  • Plug your physical device into a switch or directly to your PC with a crossover cable. I would suggest using a small switch - that is just personal preference, though. IP your physical device as appropriate on the private network with a default gateway pointing to the private network IP of your PC.

  • Place the network adapter of the VM in bridged mode onto the private network NIC and give your VM an IP in the private network range with a default gateway pointing to the private network IP of the PC.

In theory, if you have the NAT set up correctly, you should have a completely private network with the VM and physical device, while still providing internet access to both. This keeps your DHCP server off of the public network, and keeps the pitchfork-laden admins away. :)