Install Centos NAT in Vmware to set static IP addresses

Source: Internet
Author: User

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.
  • 5. service network restart the network

  • 6. ping www.baidu.com.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.