CentOS6.7 Nic ip configuration
1. after logging on to the system, enter the setup command 2. select Networkconfiguration, press Run Tool3. select Device configuration, and press enter directly. Do not press Save & Quit or Quit4. an eth0 Nic exists here. Press enter 5. select Use DHCP to allow it to automatically allocate IP addresses. dns can be configured without configuration. Click OK6. click Save7. select Save & Quit8. select Quit and exit 9. After the NIC configuration is complete, start the NIC. Enter ifup eth0 in the command line to start the eth0 Nic. Done indicates that the startup is successful. Enter ifconfig to view the obtained ip address. Ping the obtained ip address from another host to check whether the ip address can be pinged. 10. Configure the Enable auto-start of the NIC.
Cat/etc/sysconfig/network-scripts/ifcfg-eth0 can check whether boot in the configuration file is self-started.
If ONBOOT is equal to no, we need to change it to yes.
You can run the following sed replacement command to replace ONBOOT = no in the file with ONBOOT = yes.
Set-I's # ONBOOT = no # ONBOOT = yes # G'/etc/sysconfig/network-scripts/ifcfg-eth0
After the configuration is complete, the NIC will start automatically.