CentOS7 NAT mode fixed IP settings

Source: Internet
Author: User

CentOS7 NAT mode fixed IP settings

Modify the configuration file of each virtual machine and set a fixed IP Address

Cd/etc/sysconfig/network-scripts

Modify configuration content viifcfg-eno16777736Initial Configuration:

To:

BOOTPROTO = static

IPV6 ..... All comments

DNS1 = 114.114.114.114 # This is a domestic DNSip, which is fixed. Of course, there is also 8.8.8.8, which is from Google outside China.

IPADDR = 192.168.183.130 # Set an ip address in the same subnet as the IP address dynamically allocated

NETMASK = 255.255.255.0 # Subnet Mask

GATEWAY = 192.168.183.2 # GATEWAY. The nat GATEWAY of vmvare is x. x. x.2.

ONBOOT = yes

Restart service network restartView the modified IP Address

Ifconfig

Test whether the machine can Ping the Virtual Machine

Test whether the VM can connect to the Internet

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.