VMware Communities
grmnrvs
Contributor
Contributor
Jump to solution

Consult with VMware Workstation (NAT with DHCP Enabled or NAT With DHCP Disabled)

Hello to all,

I am writing because I have the following situation.

I have a laboratory with three virtual machines CentOS 8 Core of 64 bits, in them I have installed the solution of high availability of databases MariaDB Galera Cluster, a node would be the primary and the other two nodes would be replicas. The IP address would be the following:

  1. Master Node - 192.168.157.123
  2. Replica Node 1 - 192.168.157.124
  3. Replica Node 2 - 192.168.157.125

The situation I have is the following:

  • If I install each of these virtual machines from scratch, and I leave the network configuration (from VMWare Workstation) as it is by default in NAT and DHCP mode enabled so that VMWare assigns an ip address to each machine, the whole lab works perfectly.

  • If, on the contrary, I create these three virtual machines in NAT mode, but WITHOUT DHCP so that from the CentOS installation process I manually place the IP address I want, I get the virtual machines to finish, to update, I install MariaDB Galera Cluster applying the same configuration files and I discover that the Master Node works correctly, but when one of the other two nodes wants to join the Cluster, they do not succeed. They simply enter the Cluster and automatically disconnect from the Cluster.

These are the values I get from the network configuration of one of the virtual machines with NAT and DHCP enabled:

[root@ha-db01 ~]# nmcli device show ens32

GENERAL.DEVICE:                         ens32

GENERAL.TYPE:                           ethernet

GENERAL.HWADDR:                         00:0C:29:6A:BA:31

GENERAL.MTU:                            1500

GENERAL.STATE:                          100 (conectado)

GENERAL.CONNECTION:                     ens32

GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1

WIRED-PROPERTIES.CARRIER:               activado

IP4.ADDRESS[1]:                         192.168.157.123/24

IP4.GATEWAY:                            192.168.157.2

IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.157.2, mt = 100

IP4.ROUTE[2]:                           dst = 192.168.157.0/24, nh = 0.0.0.0, mt = 100

IP4.DNS[1]:                             192.168.95.2

IP4.DOMAIN[1]:                          localdomain

IP6.ADDRESS[1]:                         fe80::bc09:9689:7b5:fc4f/64

IP6.GATEWAY:                            --

IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 100

IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255

And these are the values that I obtain of network configuration of one of the virtual machines with NAT and NO DHCP (DHCP disabled).

[root@ha-db01 ~]# nmcli device show ens32

GENERAL.DEVICE:                         ens32

GENERAL.TYPE:                           ethernet

GENERAL.HWADDR:                         00:0C:29:6A:BA:31

GENERAL.MTU:                            1500

GENERAL.STATE:                          100 (conectado)

GENERAL.CONNECTION:                     ens32

GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1

WIRED-PROPERTIES.CARRIER:               activado

IP4.ADDRESS[1]:                         192.168.157.123/24

IP4.GATEWAY:                            192.168.157.2

IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.157.2, mt = 100

IP4.ROUTE[2]:                           dst = 192.168.157.0/24, nh = 0.0.0.0, mt = 100

IP4.DNS[1]:                             192.168.95.2

IP6.ADDRESS[1]:                         fe80::bc09:9689:7b5:fc4f/64

IP6.GATEWAY:                            --

IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 100

IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255

The only difference I notice is that in NAT + DHCP Enabled mode, the line is added:

IP4.DOMAIN[1]: localdomain

And that, when I make the manual configuration I do not know where I would be ...

I manually enter the IP address, subnet mask, default gateway and dns server that would be next:

  • IP: 192.168.157.123
  • Subnet mask: 255.255.255.0
  • Default Gateway: 192.168.157.2
  • Primary DNS: 192.168.157.2

Can anyone think of what might happen or what I'm doing wrong?

As additional information I have Windows 8.1 Pro + VMware Pro 15.5.6.

Thank you very much in advance.

Reply
0 Kudos
1 Solution

Accepted Solutions
grmnrvs
Contributor
Contributor
Jump to solution

hello all again,

i solved my problem. im wrong or confused with the functionality of the NAT for my final laboratorie.

I prepare a fresh new install o CentOS on NAT mode with DHCP enabled, next i made a full upgrade of the operative system and his packages, and download the packages that i need for the functionality of my data base cluster.

Next, i shutdown these VM and i change the network from NAT Mode to Host-only mode and thanks to a tool of CentOS called "NETUI" i configure the static IP Address on both servers as i need, and the cluster works perfect.

Sorry for my beginer question but i new using VMware Workstation and there are some functions that i unknow.

Thanks Tornaci​ and RDPetruska​ for your responses.

View solution in original post

Reply
0 Kudos
3 Replies
Tornaci
Enthusiast
Enthusiast
Jump to solution

Hi grmnrvs,

I just noticed that your VM's ip addresses and DNS are not in the same range.

The DNS address your VM's should have has to be in the 192.168.157.---/24 range.

I can see that your VM's have 192.168.95.2 as the DNS address in both DHCP and no DHCP configs from what you tell.

I think that this is the cause of your problem. I made a step by step guide with some suggestions.

Please follow these steps bellow:

1. Check your NAT network configuration in the "Virtual Network Editor" in VMware and reconfigure or reset it to default.

2. Make shure you have NAT sellected as network adapters for those VM's.

3. Make shure that the NAT configuration in your VM's matches the NAT configuration of VMware.

I hope this works for you.

Kind regards,

Tornaci

Reply
0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

Why do you want to use NAT connection?  Either use bridged mode, or custom VMnet

Reply
0 Kudos
grmnrvs
Contributor
Contributor
Jump to solution

hello all again,

i solved my problem. im wrong or confused with the functionality of the NAT for my final laboratorie.

I prepare a fresh new install o CentOS on NAT mode with DHCP enabled, next i made a full upgrade of the operative system and his packages, and download the packages that i need for the functionality of my data base cluster.

Next, i shutdown these VM and i change the network from NAT Mode to Host-only mode and thanks to a tool of CentOS called "NETUI" i configure the static IP Address on both servers as i need, and the cluster works perfect.

Sorry for my beginer question but i new using VMware Workstation and there are some functions that i unknow.

Thanks Tornaci​ and RDPetruska​ for your responses.

Reply
0 Kudos