Linux alpine开启ipv6 安装dhcpcd 1 2 3 4 5 6 # 安装dhcpcd apk add dhcpcd # 添加dhcpcd服务 rc-update add dhcpcd # 启动dhcpcd服务 rc-service dhcpcd start 添加路由通告 1 2 3 4 5 6 cat <<EOF > /etc/sysctl.conf net.ipv6.conf.all.accept_ra = 2 net.ipv6.conf.default.accept_ra = 2 net.ipv6.conf.eth0.accept_ra = 2 net.ipv6.conf.eth0.autoconf = 1 EOF 添加网卡支持ipv6 dhcp 注:eth0需要更换为自己的网卡名 1 2 3 cat <<EOF >/etc/network/interfaces iface eth0 inet6 dhcp EOF