Notes: CetnOS minimal network unavailable, cetnosminimal
Problem description:
After CentOS minimal is installed, the network is unavailable. Some Common commands report errors:
ping: unknow host xxxyum: Could not retrieve mirrorlist xxx error was 14: PYCURL ERROR 6 - "Could't resolve host 'mirrorlist.centos.org'" ...
Cause description:
After CentOS minimal is installed, the default Nic is not automatically started when it is started. You need to manually modify the NIC configuration no matter whether the network is configured or not (even if the network configuration is completed during installation, restart related services to make the network ready for use.
Troubleshooting:
Open the network configuration file
# vi /etc/sysconfig/network-script/ifcfg-eth0
Set to automatically obtain the IP address
ONBOOT=yesMM_Controlled=noBOOTPROTO=dhcp
(Or) set to a fixed IP Address
ONBOOT=yesMM_Controlled=noBOOTPROTO=staticIPADDR=192.168.1.33BROADCAST=192.168.1.255NETMASK=255.255.255.0GATEWAY=192.168.1.1DNS1=192.168.1.1DNS2=192.168.1.2
Complete configuration items in the network configuration file
TYPE = Ethernet # Nic type device = eth0 # Nic Interface Name ONBOOT = yes # Whether to automatically load BOOTPROTO = static when the system starts # enable address protocol -- static: static protocol -- bootp protocol -- dhcp protocol IPADDR = 192.168.1.11 # Nic IP address NETMASK = 255.255.255.0 # Nic network address GATEWAY = 192.168.1.1 # Nic GATEWAY address DNS1 = 10.203.104.41 # Nic DNS address HWADDR = 00: 0C: 29: 13: 5D: 74 # Nic device MAC address BROADCAST = 192.168.1.255 # Nic BROADCAST address
Article: http://www.cnblogs.com/zhangbo127/p/4553654.html
Reference: http://my.oschina.net/u/656588/blog/186602