Ifup, Ifdown:linux command
Real-time manual modification of some network interface parameters, you can use ifconfig to achieve, if you want to directly to the configuration file, in the/etc/sysconfig/network-scripts inside the IFCFG-ETHX and other files set parameters to start, It has to be done through Ifdown or ifup.
[Root@linux ~]# ifup {interface}/Start Network card command
[Root@linux ~]# Ifdown {interface}//disable network card command
[Root@linux ~]# ifup eth0/start Nic Eth0
Ifup and Ifdown are just too easy. These two programs are actually script, it will go directly to the/etc/sysconfig/network-scripts directory to search for the corresponding configuration file, such as Ifup eth0, it will find ifcfg-eth0 the contents of the file, and then set.
However, since these two programs are primarily the search settings file (IFCFG-ETHX) for startup and shutdown, make sure that the IFCFG-ETHX exists in the correct directory before using it, or it will fail to start. In addition, if you set or modify the network interface with Ifconfig eth0, you can no longer shut down in Ifdown eth0 mode. Because Ifdown will analyze compare current network parameter and ifcfg-eth0 whether match, do not match, will abandon this operation. Therefore, after the use of ifconfig modified, should be ifconfig eth0 down to be able to close the interface.
Linux every time you start the network card must be activated to the Internet, it is very troublesome.
VI Editor Open the following file
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0:1//view eth0:1 configuration file.
All said that there is onboot=yes this sentence can start automatic activation, but the configuration file clearly has or did not work, the boot is always manually to activate.
So add in the/etc/rc.d/rc.local file
Ifup eth0
Or
Ifconfig eth0 up//enable NIC Eth0
Ifconfig eht0 down//off NIC Eth0