先安装了 debian9 默认带ipv6 配置如下
cat /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 45.154.214.17 netmask 255.255.255.0 gateway 45.154.214.1 iface eth0 inet6 static accept_ra 0 address 2604:9cc0:0000:5a00:0000:0000:0000:0001 netmask 64 post-up /sbin/ip -r route add 2604:9cc0::1 dev eth0 post-up /sbin/ip -r route add default via 2604:9cc0::1 复制代码
然后dd后 网卡变成ens3 遂修改为
# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto ens3 iface ens3 inet static address 45.154.214.17 netmask 255.255.255.0 gateway 45.154.214.1 iface ens3 inet6 static accept_ra 0 address 2604:9cc0:0000:5a00:0000:0000:0000:0001 netmask 64 post-up /sbin/ip -r route add 2604:9cc0::1 dev ens3 post-up /sbin/ip -r route add default via 2604:9cc0::1复制代码
然后重启网络 systemctl restart networking.service
却报错
Job for networking.service failed because the control process exited with error code.
See “systemctl status networking.service” and “journalctl -xe” for details.
我哪一步做错了啊
吉林省网友说:没有问题,reboot就可以了
江苏省网友说:老哥牛逼 reboot之后确实好了
为啥重启网络报仇 重启还能成功啊