如下:
[root@rac1 ~]# systemctl status network.service
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since 三 2015-06-10 11:16:42 CST; 16s ago
Process: 10278 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 10404 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
6月 10 11:16:41 rac1 network[10404]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
6月 10 11:16:41 rac1 network[10404]: [ 确定 ]
6月 10 11:16:41 rac1 network[10404]: 正在打开接口 自动以太网: [ 确定 ]
6月 10 11:16:42 rac1 network[10404]: 正在打开接口 自动以太网-1: [ 确定 ]
6月 10 11:16:42 rac1 network[10404]: 正在打开接口 配置_1: 错误:激活连接失败:Connection 'dhcp-eth0' is already active on eno33554992
6月 10 11:16:42 rac1 network[10404]: [失败]
6月 10 11:16:42 rac1 systemd-sysctl[10609]: Overwriting earlier assignment of kernel/shmall in file '/etc/sysctl.d/99-sysctl.conf'.
6月 10 11:16:42 rac1 systemd[1]: network.service: control process exited, code=exited status=1
6月 10 11:16:42 rac1 systemd[1]: Failed to start LSB: Bring up/down networking.
6月 10 11:16:42 rac1 systemd[1]: Unit network.service entered failed state.
问题原因是:
/etc/sysconfig/network-script/ifcfg-xxx 文件中没有mac地址的原因
解决办法:
1.使用ip a 获得网卡的mac地址
[root@rac1 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:6c:c1:8b brd ff:ff:ff:ff:ff:ff
inet 192.168.133.120/24 brd 192.168.133.255 scope global eno16777736
inet6 fe80::20c:29ff:fe6c:c18b/64 scope link
valid_lft forever preferred_lft forever
3: eno33554992: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:6c:c1:95 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.218/24 brd 192.168.0.255 scope global eno33554992
inet6 fe80::20c:29ff:fe6c:c195/64 scope link
valid_lft forever preferred_lft forever
4: eno50332224: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:6c:c1:9f brd ff:ff:ff:ff:ff:ff
inet 192.168.0.120/24 brd 192.168.0.255 scope global eno50332224
2.修改 /etc/sysconfig/network-script/ifcfg-xxx 加上
HWADDR=00:0c:29:6c:c1:95
3.重新去执行 systemctl status network.service
systemctl restart network.service
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: active (exited) since 三 2015-06-10 11:30:34 CST; 1s ago
Process: 10278 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 11566 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)
6月 10 11:30:34 rac1 network[11566]: RTNETLINK answers: File exists
6月 10 11:30:34 rac1 network[11566]: RTNETLINK answers: File exists
6月 10 11:30:34 rac1 network[11566]: RTNETLINK answers: File exists
6月 10 11:30:34 rac1 network[11566]: RTNETLINK answers: File exists
6月 10 11:30:34 rac1 network[11566]: RTNETLINK answers: File exists
6月 10 11:30:34 rac1 network[11566]: RTNETLINK answers: File exists
6月 10 11:30:34 rac1 network[11566]: RTNETLINK answers: File exists
6月 10 11:30:34 rac1 systemd-sysctl[11782]: Overwriting earlier assignment of kernel/shmall in file '/etc/sysctl.d/99-sysctl.conf'.
6月 10 11:30:34 rac1 systemd-sysctl[11782]: Overwriting earlier assignment of kernel/shmmax in file '/etc/sysctl.d/99-sysctl.conf'.
6月 10 11:30:34 rac1 systemd[1]: Started LSB: Bring up/down networking.
已经正常。
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |