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

This post was originally published on this site

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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.