Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Mar 2001 22:01:47 -0500
From:      The Babbler <bts@babbleon.org>
To:        freebsd-emulation@freebsd.org
Subject:   vmware networking
Message-ID:  <3AA1B01B.9F2626D0@babbleon.org>

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

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.

Anyway, I was all ready to set this up when I read this from Akinori
-Aki- MUSHA aka while searching for postings relating to FreeBSD and
vmware.  (I've learned to check these things out *before* I do anything
new with FreeBSD now!):

	No need to do NAT.  Just enable a gateway and add route to vmnet.
	It's a real, effective IP address.  Consult "netstat -rn" and try it.

	If this question seems frequently asked, I'll put a plain explanation
	on "Hints.FreeBSD". :)

Well, I admit it.  I followed all I could on this thread, and I'm still
stumped.  And I admit it--I can't figure out *what* to make the route
to.  But I'll readily admit that, though I *have* read the man page on
route and have (with some assistance) written firewalls on both Linux
and FreeBSD, and have configured vmware fully on Linux for host-only
networking, the mysteries of what, precisely FreeBSD's gateway vs.
firewall vs. natd do, and all the capabilities of route still somewhat
elude me.

To make this a little more concrete, my vmware host has a physical ed0
interface, IP address 192.168.147.4.
The gateway for this is another FreeBSD box, which has an IP address of
192.168.147.1.  The 192.168.147.4 machine actually runs a local name
server.  (Though that's probably beside the point right now.)

For vmware, the hosts' vmnet1 address is 192.168.242.1.  The guest O/S
is win98, and it is statically configured with an IP address of
192.168.242.2, with a gateway of 192.168.242.1.

So . . . the 192.168.147  network is the physical ethernet, and
         the 192.148.242  network is the vmware logical ethernet.
In each case, node #1 on the network is the gateway for that network.

If I *don't* have gateway_enable set on the host, then the guest can
ping itself and 192.168.242.1 (the hosts' vmnet1 address), but nothing
more.

I've tried both

	route add 192.168.242.1 192.168.147.1
and
	route add 192.168.242.2 192.168.147.1

and neither of those is it, though that seemed like the most logical
thing to add to me.  I also tried taking the message literally ("route
to vmnet"), by reversing them, but that doesn't work, either.

I also tried doing things like

	i7500# route add -net 192.168.242.0 192.168.147.1
but I got
	route: writing to routing socket: File exists

which I guess isn't surprising since the netstat -r shows

	192.168.242        link#3             UC          0        0   vmnet1
=>
	i7500-vm           0:bd:9f:dc:64:6f   UHLW        1       43   vmnet1  
1010

Since I don't believe that I set up the above, I assume that it's part
of the "automatic" setup that vmware does for me . . . and it seems to
make sense; my 192.168.242 traffic goes to the i7500-vm virtual machine,
just as my 192.168.147 internal traffic is directed to my gateway
machine.  But now I want the traffic *from* the vmware virtual machine
that's not specifically meant for my machine to get passed up a level to
my gateway, and I just can't figure out what to route to specify (other
than the above, which don't work) to accomplish that.

I already have 192.168.242.2 set up as a gateway for the vmware machine
. . . 


Perhaps I'm going about this the wrong way.  Should I change thing so
that rather than having a whole seperate vmware network, I just make the
vm machine have IP address 192.168.147.101 or something--an address on
our "regular" network, and then I could just talk to it from my same
192.168.147.4 address as I use for the physical network card?  I can't
see quite how that would work.

Color me confused.

PS: If nothing else I'm sure I can do the natd route, but I hate to do
it if it's not really necessary.


If I *do* have gateway_enable set, then the guest can now successfully
ping 192.168.147.4 (the ep0 address for the host), but it still can't
ping 192.168.147.1 (the host's gateway address).

That's cool and I never would have tried that by itself without the post
from the archives.

-- 
"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?3AA1B01B.9F2626D0>