ifcfg-ethx NIC configuration file path
[email protected] ~]# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0 #网卡设备名称
onboot=yes #启动时是否激活 yes|no
bootproto=static #协议类型 DHCP BOOTP none
ipaddr=192.168.1.90 #网络IP地址
netmask=255.255.255.0 #网络子网地址
gateway=192.168.1.1 #网关地址
broadcast=192.168.1.255 #广播地址
hwaddr=00:0c:29:fe:1a:09# Network card MAC address
type=ethernet #网卡类型为以太网
re-import the Ifcfg-eth0 network configuration file
[email protected] ~]#/etc/init.d/network Reload
shutting down interface eth0: [OK]
Close Loopback interface: [OK]
Set Network parameters: [OK]
Eject Loopback interface: [OK]
Popup interface eth0: [OK]
View Network card status
[email protected] ~]#/etc/init.d/network status
To Configure the device:
Lo eth0
Current active Device:
Lo eth0
Network Service startup
Method 1
[Email protected] ~]#/etc/init.d/network restart #start stop restart
shutting down interface eth0: [OK]
Close Loopback interface: [OK]
Set Network parameters: [OK]
Eject Loopback interface: [OK]
Popup interface eth0: [OK]
Restart Network Service 2
Method 2
[email protected] ~]# Service network restart #start stop restart
shutting down interface eth0: [OK]
Close Loopback interface: [OK]
Set Network parameters: [OK]
Eject Loopback interface: [OK]
Popup interface eth0: [OK]
network card shutdown and activation
[email protected] ~]# ifdown eth0 #关闭
[email protected] ~]# ifup eth0 #激活
Nic Ifcfg-eth0 Configuration