嘟嘟社区

斯巴达DD后怎么开启IPV6 啊


先安装了 debian9 默认带ipv6 配置如下
  1. cat /etc/network/interfaces
  2. # The loopback network interface
  3. auto lo
  4. iface lo inet loopback
  5. # The primary network interface
  6. auto eth0
  7. iface eth0 inet static
  8. address 45.154.214.17
  9. netmask 255.255.255.0
  10. gateway 45.154.214.1
  11. iface eth0 inet6 static
  12.         accept_ra 0
  13.         address 2604:9cc0:0000:5a00:0000:0000:0000:0001
  14.         netmask 64
  15. post-up /sbin/ip -r route add 2604:9cc0::1 dev eth0
  16. post-up /sbin/ip -r route add default via 2604:9cc0::1

复制代码

然后dd后  网卡变成ens3 遂修改为

  1. # The loopback network interface
  2. auto lo
  3. iface lo inet loopback
  4. # The primary network interface
  5. auto ens3
  6. iface ens3 inet static
  7. address 45.154.214.17
  8. netmask 255.255.255.0
  9. gateway 45.154.214.1
  10. iface ens3 inet6 static
  11.         accept_ra 0
  12.         address 2604:9cc0:0000:5a00:0000:0000:0000:0001
  13.         netmask 64
  14. post-up /sbin/ip -r route add 2604:9cc0::1 dev ens3
  15. 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就可以了

dmxiaoshen 发表于 2021-12-18 11:07
没有问题,reboot就可以了

老哥牛逼 reboot之后确实好了

为啥重启网络报仇  重启还能成功啊