Tuesday, June 26, 2007

vmware networking - wireless bridge, nat problems

I was setting up a vmware image of Ubuntu Feisty the other night and I had a heck of a time with the networking. I went through and tried bridged, nat and host-only. I couldn't get bridged or nat to even talk to the host computer. host-only could talk to the host, I could even get it to NAT to the wifi-router, but I couldn't get it to go past that.

I wiped that image and redid the work and now I've got it working. The first basic problems was that I didn't look in dmesg. On ubuntu, it's necessary to use vmware-any-any to get vmware to work with the Ubuntu kernels (or something, in any case, something doesn't work, maybe compiler issues, and it's necessary to patch with vmware-any-any so that the vmware modules will compile).

After I finally looked in dmesg, there was a section that said that vmware bridge over a wifi device doesn't work with vmware-any-any. OK, next up was nat.

That didn't work either. It wasn't until I rebuilt the image (in fact, uninstalled and reinstalled free vmware-server) last night that I finally got nat working. Previously I had used vmware-config.pl to edit the networking settings (using the editor) and I had decided to always use vmnet0 for the bridge, and then later the nat, and later host-only and then, in the vmware client, chosen BRIDGE, NAT, HOST-ONLY as appropriate. That doesn't always work because apparently vmware has some sort of mapping for the vmnet numbers. Choosing NAT but having manually edited it at vmnet0 makes it not work because NAT starts at around vmnet8.

The trick, I found last night, was to select CUSTOM and then select the correct /dev/vmnet[0-9] entry. I've got networking working now (NAT though, since bridging on a wireless device still doesn't work) and have got the rest of the project done (install oracle 10g express edition with a small sample database, for use by my team in testing an oracle application we're developing for a large government owned corporation).

Oh yeah, and to solve it without a trick (i.e., canonically), just use the network connection wizard. It'll choose the correct number for the vmnet device type that you want to use. I like having things numbered sequentially though, which is why I got into trouble in the first place.

No comments: