全球主机交流论坛

标题: 腾讯轻量开通了IPV6,DD了debian11后,怎么绑定IPV6 [打印本页]

作者: simonce    时间: 2025-1-27 17:15
标题: 腾讯轻量开通了IPV6,DD了debian11后,怎么绑定IPV6
腾讯轻量开通了IPV6,DD了debian11后,怎么绑定IPV6
作者: sagerking    时间: 2025-1-27 17:23
啥dd脚本,还不带ipv6配置过去,换个吧
作者: scven    时间: 2025-1-27 17:24
换个dd脚本
作者: LiuJia    时间: 2025-1-27 20:48
楼主您好,如果 IPv6 是自动分配的,可尝试执行如以下命令(假如网卡名称是 eth0):iface eth0 inet6 auto

详细请参考:https://www.debian.org/doc/manuals/debian-handbook/sect.ipv6.en.html
作者: simonce    时间: 2025-1-27 21:05
scven 发表于 2025-1-27 17:24
换个dd脚本

换了还是一样,不行。

作者: qiuzhi    时间: 2025-1-29 07:14
手动配置
作者: iks    时间: 2025-1-29 09:13
官方文档好像有,修改 /etc/network/interfaces 文件

执行 ip a 之后第二块是 ens5 的话就不用修改下文的 ens5 字段,否则修改到对应的字段
  1. # This file describes the network interfaces available on your system
  2. # and how to activate them. For more information, see interfaces(5).

  3. source /etc/network/interfaces.d/*

  4. # The loopback network interface
  5. auto lo
  6. iface lo inet loopback

  7. # The primary network interface
  8. allow-hotplug ens5
  9. iface ens5 inet dhcp
  10. iface ens5 inet6 dhcp
  11.     up ip addr add 2602:fd92:06e3:4cd3:60a3:2382:0b35:6cbc/128 dev ens5
  12.     up ip -6 route add default via fe80::ecff:ffff:feff:ffff dev ens5
复制代码
其间第 14 行的 2602:fd92:06e3:4cd3:60a3:2382:0b35:6cbc 改为控制台显示的腾讯云分配的 IPv6 地址,重启机器即可

作者: cbm    时间: 2025-1-29 09:50
有偿解决
作者: simonce    时间: 2025-1-29 17:03
iks 发表于 2025-1-29 09:13
官方文档好像有,修改 /etc/network/interfaces 文件

执行 ip a 之后第二块是 ens5 的话就不用修改下文的  ...

搞定了,感谢、
作者: confident    时间: 2025-2-1 23:16
本帖最后由 confident 于 2025-2-1 23:17 编辑
iks 发表于 2025-1-29 09:13
官方文档好像有,修改 /etc/network/interfaces 文件

执行 ip a 之后第二块是 ens5 的话就不用修改下文的  ...


我有点搞不懂的是,腾讯云自己的debian系统这里,
只需要写个ipv4 dhcp就行了,ipv6甚至都没有写也能获取的ipv6地址。

我自己dd的不管写dhcp还是auto都拿不到ipv6。写accept-ra true也没用。

回头试试你这里的写法,但是又要dhcp又要手动if up的时候指定IP真是很难理解啊。
作者: simonce    时间: 2025-2-1 23:25
confident 发表于 2025-2-1 23:16
我有点搞不懂的是,腾讯云自己的debian系统这里,
只需要写个ipv4 dhcp就行了,ipv6甚至都没有写也能获取 ...

我按这个方法搞定了,一定要指定。光ipv6  dhcp 不行。
作者: confident    时间: 2025-2-2 00:07
simonce 发表于 2025-2-1 23:25
我按这个方法搞定了,一定要指定。光ipv6  dhcp 不行。

是的,我也成功了,只是没搞懂这种写法的原理,感觉很难理解。
作者: iks    时间: 2025-2-2 17:09
confident 发表于 2025-2-1 23:16
我有点搞不懂的是,腾讯云自己的debian系统这里,
只需要写个ipv4 dhcp就行了,ipv6甚至都没有写也能获取 ...

OpenStack 的问题,它 DHCPv6 来的是 IPv6 ULA


腾讯云自己的debian系统
腾讯云助手替你配好了
作者: biubiu    时间: 2025-2-2 17:41
https://github.com/bin456789/reinstall

这个可以带V6




欢迎光临 全球主机交流论坛 (https://443502.xyz/) Powered by Discuz! X3.4