vi /etc/udev/rules.d/70-persistent-net.rules
[root@localhost network-scripts]# ifconfig -a
eth2 Link encap:Ethernet HWaddr 00:0C:29:1A:73:A3
inet addr:172.168.3.201 Bcast:172.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::20c:29ff:fe1a:73a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11557 errors:0 dropped:0 overruns:0 frame:0
TX packets:173 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:876126 (855.5 KiB) TX bytes:24965 (24.3 KiB)
eth3 Link encap:Ethernet HWaddr 00:0C:29:1A:73:AD
inet6 addr: fe80::20c:29ff:fe1a:73ad/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1982 errors:0 dropped:0 overruns:0 frame:0
TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120249 (117.4 KiB) TX bytes:3678 (3.5 KiB)
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:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12800 (12.5 KiB) TX bytes:12800 (12.5 KiB)
[root@localhost ~]# service network restart
正在关闭接口 eth2: 设备状态:3 (断开连接)
[确定]
正在关闭接口 eth3: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth2: 活跃连接状态:激活的
活跃连接路径:/org/freedesktop/NetworkManager/ActiveConnection/36
[确定]
弹出界面 eth3: 活跃连接状态:激活中
活跃连接路径:/org/freedesktop/NetworkManager/ActiveConnection/37
** (process:7108): WARNING **: _nm_object_get_property: Error getting 'State' for /org/freedesktop/NetworkManager/ActiveConnection/37: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist
状态:未知
错误:激活连接失败。
[失败]
[root@localhost ~]# service NetworkManager stop
停止 NetworkManager 守护进程: [确定]
[root@localhost ~]# chkconfig NetworkManager off
[root@localhost ~]# service network restart
正在关闭接口 eth2: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth2: Determining if ip address 172.168.3.201 is already in use for device eth2...
[确定]
弹出界面 eth3:
正在决定 eth3 的 IP 信息...完成。
[确定]
[root@localhost ~]# ifconfig -a
eth2 Link encap:Ethernet HWaddr 00:0C:29:1A:73:A3
inet addr:172.168.3.201 Bcast:172.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::20c:29ff:fe1a:73a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18763 errors:0 dropped:0 overruns:0 frame:0
TX packets:469 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1402813 (1.3 MiB) TX bytes:68638 (67.0 KiB)
eth3 Link encap:Ethernet HWaddr 00:0C:29:1A:73:AD
inet addr:192.168.23.128 Bcast:192.168.23.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe1a:73ad/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4020 errors:0 dropped:0 overruns:0 frame:0
TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:243646 (237.9 KiB) TX bytes:7202 (7.0 KiB)
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:168 errors:0 dropped:0 overruns:0 frame:0
TX packets:168 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13488 (13.1 KiB) TX bytes:13488 (13.1 KiB)