VMware Communities
lukaspress
Contributor
Contributor
Jump to solution

NAT doesn't work unless I also use DHCP

I'm sure this is probably covered somewhere but I can't find the answer.

(My home setup - trying things out)

I have a linux guest (vyatta) set up as a 'virtual' router, connected to the linux host via NAT.   Other windows guests use this router to access the 'real' router supplied by my ISP, and the internet beyond.

I was using the automatic DHCP server on the NAT virtual network between host and virtual router, and it was all working fine, but I decided to try static IPs instead. I figured I just needed to configure static IPs and turn off the DHCP server.

This doesn't work though - there is no longer any connection between the virtual NIC on the host and the 'real router' facing NIC.  I can't ping the 'real' router from the virtual router or any of the windows guests.

Why is this?

Thanks

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

Welcome to the Community,

Sounds like a complicated configuration Smiley Wink

What OS are you running on the hosts? At least with Windows hosts the virtual NAT gateway address is x.x.x.2. Did you configure this gateway address in your virtual router?

André

View solution in original post

0 Kudos
7 Replies
a_p_
Leadership
Leadership
Jump to solution

Welcome to the Community,

Sounds like a complicated configuration Smiley Wink

What OS are you running on the hosts? At least with Windows hosts the virtual NAT gateway address is x.x.x.2. Did you configure this gateway address in your virtual router?

André

0 Kudos
continuum
Immortal
Immortal
Jump to solution

the VMware NAT service does NOT need the VMware DHCP service.

If it does not work for you you have misconfigured something


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
lukaspress
Contributor
Contributor
Jump to solution

@continuum - yes I know that, that's why I asked the question!

0 Kudos
lukaspress
Contributor
Contributor
Jump to solution

Complicated?  Should be easy I would think - I just don't know how it works.

Host is Slackware linux.  Also tried on Debian.

I set the default gateway in the router as the address of the 'real' router, being 192.168.1.254.  I thought that as far as the virtual router is concerned this is the gateway.  Not correct?  I was working on this copied from the vyatta config guide -

"When the local system does not know what route to use for a given destination, it forwards

packets to the “default gateway.” "

As I say this worked while dhcp was turned on, but as soon as I changed to static (and config'd the NICs appropriately) the connection's gone.

The host-facing NIC on the virtual router is configured as 192.168.8.2, while the virtual NIC on the host "vnmet8" is config'd to 192.168.8.1.

0 Kudos
lukaspress
Contributor
Contributor
Jump to solution

Anyone got any ideas?  I'll try out any suggestions (keep em clean..)

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

The host-facing NIC on the virtual router is configured as 192.168.8.2, while the virtual NIC on the host "vnmet8" is config'd to 192.168.8.1.

If I understand this correctly you have an IP address conflict. Since the NAT gateway already uses the 192.168.8.2 you cannot use this IP address for the router. You may use any free address between 3 and 127. 128-254 are reserved for DHCP (to see the ranges take a look at the Virtual Network Editor)

André

lukaspress
Contributor
Contributor
Jump to solution

Yes thats it!  Thanks.

I wasn't understanding the NAT gateway concept properly so had indeed doubled up on .8.2.  

Thanks again

0 Kudos