which IP+gateway for Freebsd guest VM in VMware workstation
Len Conrad
LConrad at Go2France.com
Sun Dec 27 12:36:18 UTC 2009
>>VMWare has lots of info how to set up the (Windows XP) VMWare Workstation networking side, but not much on setting up networking in the guest OS.
>>
>>I've tried NAT and bridging, no DHCP, and can't ping anything except the localhost IPs.
>>
>>XP ipconfig shows the fixed IP, plus 2 192.168.c.d IPs from VMnet1 and VMnet8.
>>
>>I'm sure this is really simple, but my experimentation has come up with zilch.
>
>Take a look here:
>http://www.freebsd.org/doc/en/books/handbook/config-network-setup.html
thanks, I've been setting up FreeBSD for 10 years, and have multimple FreeBSD VMs running in several ESXi hosts.
>The guest OS will have an em0 interface
it does.
> which is connected to
>a host interface VMnet1, VMnet8 or similar.
XP ipconfig shows:
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet8
Physical Address. . . . . . . . . : 00-50-56-C0-00-08
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.219.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter VMware Network Adapter VMnet1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet1
Physical Address. . . . . . . . . : 00-50-56-C0-00-01
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.198.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
The physical Ethernet adapter has a fixed public IP. I have only one public IP from the ISP. In the VMWare Virtual Network Editor, this i/f is listed as VNnet0, Type Bridged, Connected column is "-", and Subnet Address is "-"
> Actually the guest's
>networking configuration is simpler than the host's one.
yeah, right! :) It's too simple for me.
> You should
>configure the em interface with an appropriate IP address:
>1) Bridging: WinXP fixed IP and FreeBSD fixed IP
> for example, WinXP 192.168.10.100 and FreeBSD 192.168.10.101
I'd like to stay with bridged.
the XP fixed ip is a.b.c.99, and I set the em0 to a.b.c.98.
/etc/rc.d/netif restart
/etc/rc.d/routing restart
ifconfig shows em0 with .98 and correct broadcast IP, but "status: no carrier"
>2) host to host: WinXP 192.168.c.d and FreeBSD 192.168.c.x
> for example, WinXP 192.168.20.100 and FreeBSD 192.168.20.101
>
>3) NAT: WinXP 192.168.e.d and FreeBSD 192.168.e.x
> for example, WinXP 192.168.30.100 and FreeBSD 192.168.30.101
Just to get something going, I have tried NAT:
from xp ipfconfig above:
xp @ 192.168.219.1
the VMWare Virtual Network Editor shows the NAT network with gateway 192.168.219.2, so I put that in /etc/rc.conf, and set the FreeBSD rc.conf IP to 192.168.219.3.
/etc/rc.d/netif restart
/etc/rc.d/routing restart
and always get "status: no carrier"
xp can ping itself at 192.168.219.1, but can't ping .2 or .3
FreeBSD VM can't ping anything but itself.
>Keep in mind that using DHCP is much more easy as you don't have to
>search for the appropriate address yourself, the VMware's DHCP server
>will offer it. Using DHCP from the FreeBSD side is as easy as typing
>"dhclient em0".
I'd like to be able to ssh/ftp into the FreeBSD VM from Internet, so I'd prefer to stay away from DHCP for the FreeBSD VM networking.
Len
More information about the freebsd-questions
mailing list