VMware Communities
BeSharp
Contributor
Contributor

Networking Question

I wonder whether anybody can help me with this:

I run Windows Vista as the host with VMware Workstation 6 and Red Hat Linux 3.0 as guest OS. My host OS is connected to the Internet through a DSL connection via it's WLAN interface.

I've assigned a static IP address to VMware Virtual Ethernet Adapter for VMnet1: 192.168.15.5 / 255.255.255.0 and a DNS server address of 62.220.18.8 which is my ISP's DNS server.

I've configured the Linux VM's Ethernet to use Custom settings and use VMnet1 for Host-only networking.

I've configured eth0 in the guest OS to use IP address 192.168.15.2 / 255.255.255.0.

In /etc/sysconfig/network I've got:

GATEWAY="192.168.2.5"

In /etc/resolv.conf I've got:

nameserver 62.220.18.8

So that's my configuration.

I want the guest OS to be able to resolve domain names and access the internet without changing the VMnet1 Host-only setting.

What do I have to do? I am not a Linux nor a networking pro so I'd appreciate if anybody could provide me with steps to troubleshoot/set up correctly.

Maybe I gotta add routes or anything?

Your help is greatly appreciated.

Last but not least here is the netstat -rn output:

\[root@vgprottmann etc]# netstat -rn

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0

127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

0.0.0.0 192.168.15.5 0.0.0.0 UG 0 0 0 eth0

Reply
0 Kudos
10 Replies
KevinG
Immortal
Immortal

Uninstall VMware Workstation and do NOT change any of the default settings in the "Manage Virtual Network settings"

vmnet1 is used for host-only networking and your using it incorrectly in your configuration.

I assume your DSL connection on the host does not have a router, so you will need to configure your virtual machine virtual network adapter to use NAT.

You should NOT change any of the default settings in "Virtual Network Settings"

Reply
0 Kudos
BeSharp
Contributor
Contributor

Kevin,

Thanks for your answer - however this is exactly NOT what I want to do. I understand all of the other VMware network options and do understand NAT etc. however there are reasons why I need to configure it exactly as stated in my original post.

Maybe anybody else can provide me with a solution!

Reply
0 Kudos
Peter_vm
Immortal
Immortal

... however this is exactly NOT

what I want to do. I understand all of the other

VMware network options and do understand NAT etc.

however there are reasons why I need to configure it

exactly as stated in my original post.

Maybe anybody else can provide me with a solution!

You have two options. Have DNS Server installed on your host, or set routing and NAT somewhere.

Reply
0 Kudos
oreeh
Immortal
Immortal

With host-only you can't (as the name implies).

As Peter said either create a DNS server on your host which forwards to the ISPs DNS or use another type of networking.

Reply
0 Kudos
BeSharp
Contributor
Contributor

Thanks again for trying to help.

I do want to set routing and NAT "somewhere", however I need some hints as to WHAT to do. Smiley Happy

What do I have to configure on the Linux guest to make it forward all requests to the host network?

What can I do on the Windows side?

Reply
0 Kudos
oreeh
Immortal
Immortal

You don't have to set "anything" if you choose NAT - the host does all you need

(your guest is invisible to other systems).

If you want to forward packets from external networks to a NATted guest you can configure the port forwarding in "Manage Virtual Networks".

Regarding the Linux guest: set the correct gateway (and make sure the host routes the packets)

Reply
0 Kudos
BeSharp
Contributor
Contributor

oreeh:

Thanks again and sorry for being so "stupid".

I try to rephrase my question:

What do I have to do on both sides to:

\- Give the guest a static IP: 192.168.15.2

\- Give the host a static IP for the guest to communicate with: 192.168.15.5

\- Allow the guest to access the Internet through the host

Exact steps on both sides would be great. (How do I add that route..?)

Reply
0 Kudos
oreeh
Immortal
Immortal

\- at the host open "Manage Virtual Networks" and adjust the IPs used for NAT to the 192.168.15.0/24 subnet (you have to modify the host-only range too since you use this subnet there already)

\- configure NAT networking for the guest

\- give the guest a static IP from this range (192.168.15.5)

\- define the default GW and DNS in the guest (the IP is 192.168.15.2)

Reply
0 Kudos
BeSharp
Contributor
Contributor

If you could now just give me the exact command to add the correct gateway incl. netmask and also the changes I got to make to add it permanently, I hope I"m done - and happy.

Reply
0 Kudos
oreeh
Immortal
Immortal

this depends on your Linux distribution

in SuSE open YAST

in RHEL this AFAIK is kudzu

go to the networking settings and insert it there

another possibility:

cd to /etc/sysconfig/network and open the file "routes" with an editor

and change the IP after the word "default" to 192.168.15.2

Message was edited by:

oreeh

A gateway never has a netmask assigned since it's always on the local network

Reply
0 Kudos