Instance Environment
Virtual machines: VMware 11.1.0
System: CentOS 6.6
# ifconfig-a << View the status of all network cards
Wkiom1tvek_qib9xaagzcbkqshu513.jpg
2. # vi/etc/sysconfig/network-scripts/ifcfg-eth0 << Edit NIC configuration file
Wkiom1tvfbkji6ziaadk63qaehq147.jpg
Press the I key to start the configuration
What to modify:
Identification 5 Onboot=no modified to Onboot=yes
# is booting with the system
Identification 7 BOOTPROTO=DHCP modified to Bootproto=static
# IP Address allocation method, whether the DHCP server is automatically assigned or manually configured
What to add:
ipaddr=192.168.1.108 << IP
netmask=255.255.255.0 << Subnet Masks
gateway=192.168.1.1 << Gateways
dns1=202.96.128.166
dns2=202.96.134.133
DNS configuration is added according to local network provider
Wkiol1tvl2rzv-goaaebumfomou771.jpg
3. Exit Save:
① Press the ESC key
② Input: Wq return
4. Restart Network Service: # Service Network restart
Wkiom1tvgz6xnynjaaejol7ffbc165.jpg
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 automatically called before the NIC configuration file DNS configuration information
Network IP configuration for CentOS 6.6 New Installation system