Network IP configuration of the newly installed system in CentOS 6.6

Source: Internet
Author: User

Network IP configuration of the newly installed system in CentOS 6.6

Instance Environment

  • Virtual Machine: VMware 11.1.0

  • System: CentOS 6.6

  1. # Ifconfig-a <view the status of all NICs

2. # vi/etc/sysconfig/network-scripts/ifcfg-eth0 <edit Nic configuration file

Start configuration by pressing the I key

Content to be modified:

ID 5 ONBOOT = no changed to ONBOOT = yes

# Start With system?

Id 7 BOOTPROTO = dhcp changed to BOOTPROTO = static

# Whether the IP address is automatically allocated by the DHCP server or manually configured

Content to be added:

IPADDR = 192.168.1.108 <IP
NETMASK = 255.255.255.0 <Subnet Mask
GATEWAY = 192.168.1.1 <GATEWAY

DNS1 = 202.96.128.166

DNS2 = 202.96.134.20.

Add DNS Configurations Based on the local network vendor

3. Exit and save:

① Press Esc

② Input: wq press ENTER

4. restart the network service: # service network restart

DNS can also be configured in other files

# Vi/etc/resolv. conf

Join

Nameserver 202.96.128.166

Nameserver 202.96.134.133

Exit save and restart the network service. The actual/etc/resolv. conf is the DNS configuration information of the NIC configuration file before it is automatically called.

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.