Eu tenho uma instalação mínima do CentOS 7.2 em um pequeno mini PC com 6 portas Ethernet. Optei por excluir o NetworkManager da instalação, pois prefiro usar o serviço de rede básico ou mudar para o systemd-networkd. No entanto, não consigo iniciar os serviços de rede ou systemd-networkd.
systemctl status network.service -l
��● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since Tue 2011-05-10 00:01:22 UTC; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 25591 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost systemd[1]: network.service: control process exited, code=exited status=1
May 10 00:01:22 localhost systemd[1]: Failed to start LSB: Bring up/down networking.
May 10 00:01:22 localhost systemd[1]: Unit network.service entered failed state.
May 10 00:01:22 localhost systemd[1]: network.service failed.
journalctl -xe -u network.service
-- Logs begin at Tue 2011-05-10 00:00:40 UTC, end at Tue 2011-05-10 00:02:35 UTC. --
May 10 00:00:44 localhost systemd[1]: Starting LSB: Bring up/down networking...
-- Subject: Unit network.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit network.service has begun starting up.
May 10 00:00:44 localhost network[334]: Bringing up loopback interface: [ OK ]
May 10 00:00:45 localhost network[334]: Bringing up interface eth0: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth
0 does not seem to be present, delaying initialization.
May 10 00:00:45 localhost network[334]: [FAILED]
May 10 00:00:45 localhost network[334]: Bringing up interface eth1: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth
1 does not seem to be present, delaying initialization.
May 10 00:00:45 localhost /etc/sysconfig/network-scripts/ifup-eth[702]: Device eth1 does not seem to be present, delaying initializa
tion.
May 10 00:00:45 localhost network[334]: [FAILED]
May 10 00:00:45 localhost systemd[1]: network.service: control process exited, code=exited status=1
May 10 00:00:45 localhost systemd[1]: Failed to start LSB: Bring up/down networking.
-- Subject: Unit network.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit network.service has failed.
--
-- The result is failed.
May 10 00:00:45 localhost systemd[1]: Unit network.service entered failed state.
May 10 00:00:45 localhost systemd[1]: network.service failed.
May 10 00:01:20 localhost systemd[1]: Starting LSB: Bring up/down networking...
Aqui está dmesg | grep e1000e
[root@localhost ~]# dmesg | grep eth
[ 9.194339] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:01:05:0f:2a:a0
[ 9.202239] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[ 9.209127] e1000e 0000:00:19.0 eth0: MAC: 7, PHY: 8, PBA No: FFFFFF-0FF
[ 9.320640] e1000e 0000:04:00.0 eth1: registered PHC clock
[ 9.320643] e1000e 0000:04:00.0 eth1: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:53
[ 9.320645] e1000e 0000:04:00.0 eth1: Intel(R) PRO/1000 Network Connection
[ 9.320734] e1000e 0000:04:00.0 eth1: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[ 9.453298] e1000e 0000:05:00.0 eth2: registered PHC clock
[ 9.458777] e1000e 0000:05:00.0 eth2: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:54
[ 9.466673] e1000e 0000:05:00.0 eth2: Intel(R) PRO/1000 Network Connection
[ 9.473608] e1000e 0000:05:00.0 eth2: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[ 9.609123] e1000e 0000:06:00.0 eth3: registered PHC clock
[ 9.609126] e1000e 0000:06:00.0 eth3: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:55
[ 9.609128] e1000e 0000:06:00.0 eth3: Intel(R) PRO/1000 Network Connection
[ 9.609203] e1000e 0000:06:00.0 eth3: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[ 9.704211] e1000e 0000:07:00.0 eth4: registered PHC clock
[ 9.704214] e1000e 0000:07:00.0 eth4: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:56
[ 9.704216] e1000e 0000:07:00.0 eth4: Intel(R) PRO/1000 Network Connection
[ 9.704291] e1000e 0000:07:00.0 eth4: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[ 9.816322] e1000e 0000:08:00.0 eth5: registered PHC clock
[ 9.816324] e1000e 0000:08:00.0 eth5: (PCI Express:2.5GT/s:Width x1) 00:01:05:0f:2a:a1
[ 9.816326] e1000e 0000:08:00.0 eth5: Intel(R) PRO/1000 Network Connection
[ 9.816483] e1000e 0000:08:00.0 eth5: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[root@localhost ~]# ip addr
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
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN
link/gre 0.0.0.0 brd 0.0.0.0
3: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
4: enp0s25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:01:05:0f:2a:a0 brd ff:ff:ff:ff:ff:ff
5: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:30:59:08:18:53 brd ff:ff:ff:ff:ff:ff
6: enp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:30:59:08:18:54 brd ff:ff:ff:ff:ff:ff
7: enp6s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:30:59:08:18:55 brd ff:ff:ff:ff:ff:ff
8: enp7s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:30:59:08:18:56 brd ff:ff:ff:ff:ff:ff
9: enp8s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:01:05:0f:2a:a1 brd ff:ff:ff:ff:ff:ff
10: eth_bri: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether ae:75:23:c7:e3:b6 brd ff:ff:ff:ff:ff:ff
inet 129.193.148.1/24 brd 129.193.148.255 scope global eth_bri
valid_lft forever preferred_lft forever
inet6 fe80::ac75:23ff:fec7:e3b6/64 scope link
valid_lft forever preferred_lft forever
Journctl -u network.service parece implicar que não há eth0, mas a partir de dmesg mostra que há eth0 a eth5. Contudo; quando eu emito ip addr, você pode ver que todos eles foram renomeados para o novo estilo fornecido por systemd-udevd; enp0s25... etc.
Há outro tópico aqui Não é possível iniciar o serviço de "rede" do CentOS 7, o que implica que o serviço dhcpclient pode estar atrapalhando. A resposta a esse tópico sugere desabilitar o serviço dhcpclient. No meu caso, não tenho um dhcpclient rodando.
[root@localhost ~]# ps -ef | grep dhc
root 2506 23576 0 00:23 ttyS0 00:00:00 grep --color=auto dhc
[root@localhost ~]#
O NetworkManager é uma... coisa ruim. Remova-o e configure suas interfaces em /etc/sysconfig/network-scripts/ifcfg-(NAME OF INTERFACE)
Sua saída dmesg mostra que o kernel iniciou eth0-ethX como nomes de interface, mas algo os renomeou para nomes "mais amigáveis".
Os nomes das interfaces atuais serão listados por um
ip addr show
como root.Você tem que configurar manualmente as interfaces. Este link deve fornecer o que você precisa.
http://ask.xmodulo.com/configure-static-ip-address-centos7.html
Isto resolverá o problema!
-Reinicie o serviço de rede
AGORA! Trabalhando.