vmware3 networking confusion...

Per Hedeland per at hedeland.org
Fri May 11 19:04:33 UTC 2007


Gore Jarold <gore_jarold at yahoo.com> wrote:
>
>I have this in my /usr/X11R6/etc/vmware/config file:
>
>vmnet1.Bridged = "YES"
>vmnet1.BridgeInterface = "bge0"
>vmnet1.HostOnlyAddress = "192.168.0.90"
>vmnet1.HostOnlyNetMask = "255.255.255.0"
>
>The bottom line is, if I configure my winXP guest to
>have IP 192.168.0.90, it complains that that address
>is already in use, and I can see it in the winXP arp
>table.  BUT, I cannot ping it.
>
>If I give it 192.168.0.91, it isn't on the network. 
>It can still see .90 (is in the arp table) but it
>can't ping it.

The IP address and netmask in that file are basically "bogus" - for
proper operation, you want them to be from a network that you don't ever
want to talk to. Of course that may not be your only problem - using the
vmware rc script is crucial to get the networking set up right, and I
seem to recall that you have been playing around a bit with that...
Running it with 'stop' as argument, and then, after having changed the
address/netmask per above, with 'start', may clear things up. For the
long story, and how to get rid of that IP address altogether, read the
MultipleInstances.FreeBSD file.

>What step have I missed in making networking work for
>my guest VMs ?  I tried 'kldload bridge.ko' but that
>did not help ...

The vmware networking uses netgraph(4), bridge(4) is irrelevant. I wrote
the current version of the netgraph setup in the rc script - if I were
to do it again I'd surely use bridge(4) instead, which is *way* simpler
(I use it for bridging qemus all the time now, and it's totally
painless). The decision to use netgraph was made before I started
messing with it, I think bridge(4) may not have been as mature back
then.

Scott Robbins <scottro at nyc.rr.com> wrote:
>
>On Fri, May 11, 2007 at 07:55:55AM -0700, Gore Jarold wrote:
>> 
>> [1] at least, I am fairly certain I installed the port
>> with bridged networking ... is there any way I can
>> verify this ?
>
>Yes, your config, showing BridgeInterface shows that this is what you
>did. 

Right, in fact the contents of that file is the sole result of answering
the questions in the dialogue at install time - nothing in the actual
installation gets hardwired one way or the other.

Gore Jarold <gore_jarold at yahoo.com> wrote:
>
>I switched winXP to DHCP and attempted to grab an
>address, but was unsuccessful.  Should it be getting
>an address from the network as a whole, or do I need
>to run a DHCP server on the host system ?

When you have gotten the bridged setup working, the guest OS will be
able to get an address from your off-host DHCP server.

>I'm not sure I understand what the network path is
>between a host-only guest, the vmnet1 interface, and
>the rest of the network ...

Reading the abovementioned file may help (or not:-). For starters, think
of the vmnet interface and the guest-OS' interface as forming their own
little network - i.e. your FreeBSD box has the vmnet interface on that
network, and the guest OS has its interface there too, and that's it.
>From this it should be obvious that the vmnet interface can't have the
same IP address as the guest OS' interface at least.:-)

With bridged mode, you are tying the vmnet interface together with one
of your physical interfaces - basically all interfaces are now for
practical purposes on your physical ethernet. This means that your
FreeBSD now has two interfaces on that network, the physical one and the
vmnet one - and in such as setup (just as when you're doing "real"
bridging between two physical networks), there is really no need for
more than one of them having an IP address at all. Except that vmware
running in default "host only" mode expects to find one...

--Per Hedeland


More information about the freebsd-emulation mailing list