debian10:
ipv6 地址以及网关的获取方式:
美区账号登录:https://ca.api.kimsufi.com/
请求:https://ca.api.kimsufi.com/console/#/dedicated/server/%7BserviceName%7D/specifications/network~GET
(欧洲将链接中 ca 换成 eu )
填入主机名,Execute,便可找到:
{
.....
-vmac: {
supported: true
}
-routing: {
-ipv6: {
gateway: "xx"
ip: "xx/128"
network: "xxx/56"
}
-ipv4: {
network: "xx"
ip: "xx"
gateway: "xx"
}
}
-vrack: {
type: null
bandwidth: null
}
}
编辑文件/etc/network/interfaces
添加以下代码
iface ens3 inet6 static ##ens3为我的网卡,请修改成自己的网卡
address 你的ipv6地址
netmask 128
post-up /sbin/ip -f inet6 route add IPv6_GATEWAY dev ens3
post-up /sbin/ip -f inet6 route add default via IPv6_GATEWAY
pre-down /sbin/ip -f inet6 route del IPv6_GATEWAY dev ens3
pre-down /sbin/ip -f inet6 route del default via IPv6_GATEWAY
service networking restart
ping6 -c 4 google.com