Configuration of the CentOS IP

Source: Internet
Author: User

1. Open the Command window and switch to the root account: Su-root

2. Enter directory:/etc/sysconfig/network-scripts, open File VI ifcfg-eth0

3. Modify the Parameters:

# # NAME device=eth0# The physical address of the network card hwaddr=00:0c:29:6a:91:5atype=ethernet# bootproto=dbcp get the IP is automatically obtained, static is fixed IP, None is a manual bootproto=static# configured IP address ipaddr=192.168.40.126# configuration dns1dns1=192.168.40.2# Configure the Gateway gateway=192.168.40.2netmask= 255.255.255.0nm_controlled=no# the network interface is active at startup Onboot=yesnm_controlled=yes

4.:x exit Edit, restart service network start so it's ready.

5. Additional Instructions:

The Bootproto needs to be configured statically, or the system will fail to restart
Configure DNS1 and gateways yourself, DNS corresponds to DNS on the physical machine or VMnet8 corresponding gateways


Configuration of the CentOS IP

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.