Install Centos NAT in Vmware to set static IP addresses
[It is inconvenient for DHCP to automatically obtain IP addresses when setting up a cluster environment in Vmware. To reduce frequent configuration changes for fixed IP addresses, we recommend that you use static IP addresses for configuration. There are three main Network Connection Methods: 1.nat 2. the bridging mode is the three host mode. Here we mainly introduce the NAT mode. Why does the NAT static IP address not need to be used to bridge static IP addresses? There is a certain security in the bridging mode. NAT is a network-converted address, the bridge is VMnet0. It needs to bind and set the corresponding Nic IP address in the same section. NAT is the converted IP address of the Vmnet network proxy, which is used to hide the internal address to improve security. The following is the configuration according to the NAT method. Note: Remind yourself to be careful when configuring, do not fill in the incorrect IP gateway for many unsuccessful reasons (I have entered the wrong IP address for several times )]
- 1. Run cmd on the Windows server to run ipconfig to view the VMnet 8 IP address.
- 2. view and modify the corresponding information in Vmware
- 3. View NAT Gateway
- 4./etc/sysconfig/network-script/ifcfg-eth0 modify key code
Class DEVICE = eth0 // DEVICE name ONBOOT = yes // whether the network interface is valid during system startup BOOTPROTO = static // BROADCAST = 192.168.154.255IPADDR = 192.168.154.101 // ip address, follow the steps 2 to set the network segment 0-for any NETMASK = 255.255.255.0 // subnet mask, and follow the subnet mask GATEWAY = 192.168.154.2/GATEWAY shown in step 2, follow the same steps as the gateway shown in step 3: DNS1 = 192.168.154.2 // DNS. You can use "," to separate multiple NAT methods. The DNS is consistent with the gateway.