Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Mar 2001 22:22:27 -0500
From:      The Babbler <bts@babbleon.org>
To:        mikko@dynas.se
Cc:        emulation@freebsd.org
Subject:   Re: vmware networking
Message-ID:  <3AA30673.4FC7F9C5@babbleon.org>
References:  <Pine.BSF.4.21.0103041526380.287-100000@atlas.home.dynas.se>

next in thread | previous in thread | raw e-mail | index | archive | help

Thank you *very* much for going to the trouble to try this.
I'm not sure what the results mean, but I tried to follow the same steps
you did (roughly, anyway--I started composing this reply and doing them
one by one, which precluded actually rebooting; if It acts differently
after I reboot my host, I'll post an ammendment to this replay;
otherwise, you can assume that it acted the same).

Mikko Työläjärvi wrote:
> 
> On Sun, 4 Mar 2001, The Babbler wrote:
> 
> > Mikko Tyolajarvi wrote:
> > >
> > > In local.freebsd.emulation you write:
> > >
> > > >I'm trying to get networking going with vmware under FreeBSD.
> > >
> > > >I was going to set up host-only networking and use NATD to get to the
> > > >Great Wide World under vmware.  This is kinda lucky since host-only is
> > > >apparently the only sort of networking that vmware supports under
> > > >FreeBSD.
> > >
> > > Last time I installed vmware, one had to have bridging support in the
> > > kernel, configure vmware for "host-only" networking, and then it Just
> > > Worked(tm) - full network access from vmware after giving the guest OS
> > > an IP address on the same subnet as the host OS. You can even use DHCP.
> > >
> > > The port has since been changed to use netgraph to do the bridging,
> > > which I assume should work without building a new kernel.  So, it
> > > should work out-of-the box, without nat.
> >
> > Well, it doesn't.  Any ideas on where to start?
> 
> Ok, just for the hell of it, I ripped BRIDGE out of my kernel and
> deinstalled the vmware port (built new kernel, rebooted etc).  Now I
> should be in the same position as you.
> 
> 0.  Verify vmware port version. I'm using /usr/ports/emulators/vmware2
>     (note the "2").  Makefile has PORTVERSION=2.0.3.799, PORTREVISION=1
> 
>     If you are using the "emulators/vmware" port, you're on your own,
>     sorry.

I'm using vmware2,, version 2.0.3.799.  Check.

> 1.  make install.  I get a dialog asking whether I want to use netgraph
>     bridging.  Sure.  Choose "yes".  I get to enter network interface
>     (happens to be "dc0" on this box).

Here's where my behavior differs from yours.  I don't get such a dialog.
I just did a deinstall/reinstall, and no such dialog.  I tried it with
both
"deinstall / reinstall" and "deinstall / install."

This is perhaps because I have netgraph already.  Which perhaps I got
whne I first installed vmware2; I can't remember.  (I installed it a
while ago, but I'm just now seriously trying to get it to work the way I
need it to.)

> 2.  Port installs and prints a message (actually it prints lots
>     of other stuff too) about running ${PREFIX}/etc/rc.d/vmware.sh start

Yes.
 
> 3.  I run "/usr/local/etc/rc.d/vmware.sh start". I also run
>     "/usr/local/etc/rc.d/rtc.sh start".  This should be equivalent to
>     what happens at boot.

Looks like it was already running . . . probably from before I did the
deinstall/install.
(It complains that the modules already exist.)

> 
> 4.  ifconfig & netstat shows that I now have a "vmnet1" interface with
>     address 192.168.0.1.  I'm running a 192.168.250.0 net here - I
>     wonder if there is a connection.  Hmm.. nope.  The address seems
>     hardcoded and ends up in /usr/local/etc/vmware/config.  I suppose
>     strange thyings will happen if you are already using 192.168.0.0,
>     but it should be easy enough to change.

My vmnet1 is on 192.168.242.1.   That's where I told it to go when I
first installed vmware and it asked from the vm-config.sh (or whatever
that startup shell script is).  I can scarcely imagine that the IP
address is the source of the difficulty, though.
> 
> 5.  Fire up vmware with a previously installed OS, configured for
>     "host-only" networking. (testing with NetBSD, much quicker than
>     NT).  It comes up and believes it runs on my 192.168.250 net.

Alas, the only guest I need to run is win98, but from there I can ping
192.168.242.2 (my virtual self), 192.168.242.1 (the host end of the
vmnet1 interface), *and* 192.168.147.4 (the IP address of the physical
ethernet card in my host), but *not* 192.168.147.1 (the IP address of
the gateway machine to which the host is hooked) or 204.71.200.68
(www.yahoo.com, which happens to be my favorite site for random pings).

This is with the guest configured to use 192.168.242.2 as its IP address
and 192.168.241.1 as its gateway, but I've also tried it with other
addresses . . . 

I tried DHCP startup, but that decided on address 169.254.147.50, which
is totally goofy, and with it set like that, all addresses I've tried
are unreachable.  Which makes sense since nobody's prepared to talk to
somebody at that address.

I tried setting the virtual machine to be be at 192.168.147.99, so it
would be *on* the 192.168.147 network, and setting the gateway to the
"real" gateway (129.168.147.1), but, again, nothing works at all.

On the other hand, I discovered (I think) why the NATD solution didn't
work--despite what I thought I knew, my kernel wasn't built with
firewall support.  I'm going to try building a kernel with firewall
support and bridging and see if I can then make it work like it was
working under Linux.

I probably need the more complex solution anyway, I suspect, becuase I
run a *local* name server, and I wasn teh guest to use the host's name
server, so I can't have straight pass-through--I've got to be able to
address my host directly.

> 6.  Let out a big sigh of relief. Works like a charm.

That sounds like fun!

> That's it.  Now all you have to do is to try to figure out where you
> deviate from this "golden path to success" :-)
> 
>      Good luck,
>      /Mikko
> 
>  Mikko Työläjärvi_______________________________________mikko@rsasecurity.com
>  RSA Security
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-emulation" in the body of the message

-- 
"Brian, the man from babble-on"              bts@babbleon.org
Brian T. Schellenberger                      http://www.babbleon.org
Support http://www.eff.org.                  Support decss defendents.
Support http://www.programming-freedom.org.  Boycott amazon.com.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AA30673.4FC7F9C5>