![系列网络错误(CentOS 7)](https://linux22.com/image/10604/%E7%B3%BB%E5%88%97%E7%BD%91%E7%BB%9C%E9%94%99%E8%AF%AF%EF%BC%88CentOS%207%EF%BC%89.png)
我正在尝试让 IPv6 在服务器上运行,但似乎无法正常运行,但似乎我还有更大的问题,我认为这些问题也阻碍了我运行 IPv6 网络。我什至无法在没有错误的情况下重新启动网络。编辑:我刚刚尝试过一些东西,所以请参阅底部的更新。
-- Unit network.service has begun starting up.
Aug 01 16:59:57 server.myhost.com systemd-sysctl[3646]: Failed to write '99999999999999' to '/proc/sys/net/ipv6/conf/ens3/max_addresses': Invalid argument
Aug 01 16:59:57 server.myhost.com NetworkManager[583]: <warn> [1501621197.7556] ifcfg-rh: ignoring manual default route: 'default via 2001:0df3:5c00:0552:0000:0000:0000:0001' (/etc/sysconfig/network-scripts/route6-eth0)
Aug 01 16:59:57 server.myhost.com network[3623]: Bringing up loopback interface: [ OK ]
Aug 01 16:59:57 server.myhost.com network[3623]: Bringing up interface ens3: [ OK ]
Aug 01 16:59:58 server.myhost.com NetworkManager[583]: <warn> [1501621198.0306] ifcfg-rh: ignoring manual default route: 'default via 2001:0df3:5c00:0552:0000:0000:0000:0001' (/etc/sysconfig/network-scripts/route6-eth0)
Aug 01 16:59:58 server.myhost.com NetworkManager[583]: <info> [1501621198.1393] audit: op="connection-activate" uuid="5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03" name="System eth0" result="fail" reason="No suitable device found for this connection."
Aug 01 16:59:58 server.myhost.com network[3623]: Bringing up interface eth0: Error: Connection activation failed: No suitable device found for this connection.
Aug 01 16:59:58 server.myhost.com network[3623]: [FAILED]
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com network[3623]: RTNETLINK answers: File exists
Aug 01 16:59:58 server.myhost.com systemd-sysctl[3786]: Failed to write '99999999999999' to '/proc/sys/net/ipv6/conf/ens3/max_addresses': Invalid argument
Aug 01 16:59:58 server.myhost.com systemd[1]: network.service: control process exited, code=exited status=1
Aug 01 16:59:58 server.myhost.com 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.
Aug 01 16:59:58 server.myhost.com systemd[1]: Unit network.service entered failed state.
Aug 01 16:59:58 server.myhost.com systemd[1]: network.service failed.
Aug 01 16:59:58 server.myhost.com polkitd[571]: Unregistered Authentication Agent for unix-process:3617:42765 (system bus name :1.60, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Aug 01 17:00:01 server.myhost.com systemd[1]: Started Session 2 of user root.
-- Subject: Unit session-2.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-2.scope has finished starting up.
--
-- The start-up result is done.
Aug 01 17:00:01 server.myhost.com systemd[1]: Starting Session 2 of user root.
-- Subject: Unit session-2.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-2.scope has begun starting up.
Aug 01 17:00:01 server.myhost.com CROND[3798]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Aug 01 17:01:01 server.myhost.com systemd[1]: Started Session 3 of user root.
-- Subject: Unit session-3.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-3.scope has finished starting up.
--
-- The start-up result is done.
Aug 01 17:01:01 server.myhost.com systemd[1]: Starting Session 3 of user root.
-- Subject: Unit session-3.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-3.scope has begun starting up.
Aug 01 17:01:01 server.myhost.com CROND[3946]: (root) CMD (run-parts /etc/cron.hourly)
Aug 01 17:01:01 server.myhost.com run-parts(/etc/cron.hourly)[3949]: starting 0anacron
Aug 01 17:01:01 server.myhost.com run-parts(/etc/cron.hourly)[3955]: finished 0anacron
我看到它正在引用,/etc/sysconfig/network-scripts/route6-eth0
但我的界面是ens3
这样,所以我对其进行了编辑route6-eth0
和更改:
2001:0df3:5c00:0552:0000:0000:0000:0001 dev eth0
default via 2001:0df3:5c00:0552:0000:0000:0000:0001
到:
2001:0df3:5c00:0552:0000:0000:0000:0001 dev ens3
default via 2001:0df3:5c00:0552:0000:0000:0000:0001
然后我跑了:mv /etc/sysconfig/network-scripts/route6-eth0 /etc/sysconfig/network-scripts/route6-ens3
但仍然出现错误。
这是来自的输出systemctl status network.service
:
Aug 01 17:13:52 server.host.com 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.
Aug 01 17:13:52 server.host.com systemd[1]: Unit network.service entered failed state.
Aug 01 17:13:52 server.host.com systemd[1]: network.service failed.
Aug 01 17:13:52 server.host.com polkitd[571]: Unregistered Authentication Agent for unix-process:5957:126228 (system bus name :1.99, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
[root@vn1 ~]# nano /etc/sysconfig/network-scripts/route6-eth0
[root@vn1 ~]# nano /etc/sysconfig/network-scripts/route6-ens3
[root@vn1 ~]# nano /etc/sysconfig/network-scripts/route6-ens3
[root@vn1 ~]# systemctl restart network
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
[root@vn1 ~]# systemctl status network.service
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-08-01 17:18:18 EDT; 6s ago
Docs: man:systemd-sysv-generator(8)
Process: 6762 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
Aug 01 17:18:18 server.host.com network[6762]: RTNETLINK answers: File exists
Aug 01 17:18:18 server.host.com network[6762]: RTNETLINK answers: File exists
Aug 01 17:18:18 server.host.com network[6762]: RTNETLINK answers: File exists
Aug 01 17:18:18 server.host.com network[6762]: RTNETLINK answers: File exists
Aug 01 17:18:18 server.host.com network[6762]: RTNETLINK answers: File exists
Aug 01 17:18:18 server.host.com network[6762]: RTNETLINK answers: File exists
Aug 01 17:18:18 server.host.com systemd[1]: network.service: control process exited, code=exited status=1
Aug 01 17:18:18 server.host.com systemd[1]: Failed to start LSB: Bring up/down networking.
Aug 01 17:18:18 server.host.com systemd[1]: Unit network.service entered failed state.
Aug 01 17:18:18 server.host.com systemd[1]: network.service failed.
这是/etc/sysconfig/network-scripts/ifcfg-ens3
:
HWADDR=00:16:3C:35:02:72
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=ens3
UUID=c74b3d53-6175-469c-8163-0905403413b3
ONBOOT=yes
IPADDR=61.14.235.156
GATEWAY=61.14.235.1
NETMASK=255.255.255.0
DNS1=61.14.235.2
DNS2=8.8.8.8
答案1
已通过删除 修复/etc/sysconfig/network-scripts/ifcfg-eth0
。它是主机自动配置的结果。