In the newly installed CentOS7 and the previous version of the CentOS6, the initial state is no network configuration, you need to use the dhclient command to obtain an IP address automatically, to see the IP address obtained using the command IP addr, you will see the network card information and LO card information, Enter configuration file to modify IP information
Vi/etc/sysconfig/network-scripts/ifcfg-enoxxxxxxx
Modified: Onboot=yes
Bootproto=static
Added: Ipaddr= #IP地址
gateway= #默认网关
netmask= #子网掩码
dns1= #DNS
Save exit, restart NIC
Service network restart;
At this point, using the ifconfig prompt without the command, you need to install the Net-tools tool, Yum install-y net-tools, installation is complete ifconfig, view network card information
This article is from the "Tea Incense" blog, please be sure to keep this source http://chinawu.blog.51cto.com/10692884/1742027
See the IP address under CentOS 7