eth0 Link encap:Ethernet HWaddr 00:0C:29:F4:47:DD
inet6 addr: fe80::20c:29ff:fef4:47dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:67 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5172 (5.0 KiB) TX bytes:468 (468.0 b)
Interrupt:19 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:720 (720.0 b) TX bytes:720 (720.0 b)
[root@localhost Pictures]# service network restart
正在关闭接口 eth0: 错误:断开设备 'eth0'(/org/freedesktop/NetworkManager/Devices/0)失败:This device is not active
[失败]
关闭环回接口: [确定]
弹出环回接口: [确定]
[root@localhost Pictures]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
NM_CONTROLLED=yes
ONBOOT=no
TYPE=Ethernet
UUID="0c163339-9fd3-4fc6-89b6-3ffda0612384"
USERCTL=no
IPV6INIT=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="System eth0"
HWADDR=00:0c:29:f4:47:dd
PREFIX=24
LAST_CONNECT=1366215206
IPADDR=192.168.9.187
NETMASK=255.255.255.0
GATEWAY=192.168.9.254
[root@localhost Pictures]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost Pictures]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="0c163339-9fd3-4fc6-89b6-3ffda0612384"
USERCTL=no
IPV6INIT=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="System eth0"
#HWADDR=00:0c:29:f4:47:dd
PREFIX=24
LAST_CONNECT=1366215206
IPADDR=192.168.9.187
NETMASK=255.255.255.0
GATEWAY=192.168.9.254
[root@localhost Pictures]# service network restart
正在关闭接口 eth0: 设备状态:3 (断开连接)
[确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0: 活跃连接状态:激活的
活跃连接路径:/org/freedesktop/NetworkManager/ActiveConnection/1
[确定]
[root@localhost Pictures]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:F4:47:DD
inet addr:192.168.9.187 Bcast:192.168.9.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fef4:47dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:324 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23850 (23.2 KiB) TX bytes:7247 (7.0 KiB)
Interrupt:19 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:720 (720.0 b) TX bytes:720 (720.0 b)
[root@localhost Pictures]#