VMware Communities
Nazgulled
Contributor
Contributor

Using NAT on Linux Guest with Host Networking using 2 different interfaces on 2 different locations

Hi

I'm using Windows Vista as host and Gentoo Linux as guest with VMware Workstation 6 and I have a few problems with NAT networking.

I normally use 2 networks to connect to the internet, the one at my home which is ADSL and I use a router (wired), the other one is my university's WiFi network.

University's WiFi:

I have dhcpcd installed and auto-starting at default or boot level can't really remember. The file /etc/conf.d/net is configured with just one line, that is: config_eth0=("dhcp"). When I have NAT selected in VMware, I can surf the web in the Gentoo Linux guest using the university's WiFi connection without any problems.

Home ADSL:

The same NAT configuration as described above, doesn't work and I want to know why and if there's any way to fix it. When at home, I need to use bridged networking in VMware, then change /etc/conf.d/net to fit my router's settings and also, change manually the name servers in /etc/resolv.conf.

As you see, for both connections to work, I need to change the configuration files accordingly. At weekends, I'm at home, during the week, I'm at the university and it's a pain in the ass to keep changing the files so I can use each configuration.

Basically, I want to use NAT for both locations, univerisy and home. At the university, NAT works just fine using dhcpcd, but not that home because at home, the dhcp server on the router is disabled and this can't be changed, I can't use dhcp server at home, it's out of the question. I need to have a specific IP address for each computer at home.

How can I have NAT networking for both?

0 Kudos
2 Replies
Nazgulled
Contributor
Contributor

Anyone? Smiley Sad

0 Kudos
TMickP
Contributor
Contributor

Ok, I am not a big NAT guy, but I can tell you that you must add two distinct devices for the Network. One for wireless and one for the wired connection. You will be able to attach each device separately, and then you will need to add a network connection on the Linux side. This has worked for me in the past. I have recently switched to VMWare Fusion on Mac, and now, I only need one network device. I hope this helps you.

Thomas

0 Kudos