In Centos, the IP address and DNS manual setting method are installed in the Centosminimal version of the virtual machine. by default, there is no local connection to eth0 or eth1, and there is only one lo 127.0.0.1 address. You need to manually edit the configuration file so that the system can load a local connection... the Centos minimal version installed in the virtual machine by using the IP address and DNS manual setting method in Centos. by default, no local connections such as eth0 or eth1 are available,
There is only one lo 127.0.0.1 address. Therefore, you need to manually edit the configuration file for the system to load a local connection. you can select DHCP or manual. There are a lot of files under the/etc/sysconfig/network-script directory, where the ifcfg-eth0 is the file to be modified. Www.2cto.com DEVICE = "eth0" # manually specify the IP address IPADDR = "192.168.10.200" # subnet mask NETMASK = "255.255.255.0" # GATEWAY = "192.168.10.1" # static ip bootproto = "static" HWADDR = ""08: 00: 27: 25: EC: 5A "NM_CONTROLLED =" yes "ONBOOT =" yes "TYPE =" Ethernet "UUID =" f10dd2b3-2ec3-467c-937b-bc5a1e1d063c "if you need to automatically obtain the IP address through DHCP, so: DEVICE = "eth0" # comment out the following three lines # IPADDR = "192.168.10.200" # NETMASK = "255.255.255.0" # GATEWAY = "192.168.10.1" # declare using dhcp to obtain IPBOOTPROTO = "dhcp" HWAD DR = "08: 00: 27: 25: EC: 5A" NM_CONTROLLED = "yes" ONBOOT = "yes" TYPE = "Ethernet" UUID = "f10dd2b3-2ec3-467c-937b-bc5a1e1d063c" after saving, you can use the service network restart command to restart the network service. Modify the DNS configuration file/etc/resolv. conf. it is very simple: After the nameserver 8.8.8.8nameserver 192.168.10.196 is saved, run the service network restart command to restart the network service.
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.