系统环境:Debian Testing

网卡名称查看:ifconfig

ps:Debian 没有 ifconfig 安装:apt install net-tools

1、nano /etc/dhcp/dhclient6.conf
# 新建粘贴如下代码:
interface "enp1s0" {
    send dhcp6.client-id DUID;    # DUID 面板中有
}

2、nano /etc/network/interfaces
# 新增如下代码:
iface enp1so inet6 static
    accept_ra 1
    pre-up dhclient -cf /etc/dhcp/dhclient6.conf -pf /run/dhclient6.enp1s0.pid -6 -P enp1s0 && ifconfig enp1s0 inet6 add v6_id/56
    pre-down dhclient -x -pf /run/dhclient6.enp1s0.pid
    address v6_id
    netmask 56    # 填 56 或 48

重启系统,测试 ping ipv6.google.com 或 ifconfig 查看是否成功

Last modification:March 3rd, 2020 at 04:14 pm
如果觉得我的文章对你有用,请随意赞赏